You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "João Reis (Jira)" <ji...@apache.org> on 2025/05/12 12:38:00 UTC

[jira] [Commented] (CASSGO-74) Calling Close() on a nil session panics

    [ https://issues.apache.org/jira/browse/CASSGO-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17950952#comment-17950952 ] 

João Reis commented on CASSGO-74:
---------------------------------

I'm a bit confused, why would a user be calling Close on a nil pointer and why would that be considered a gocql bug?

> Calling Close() on a nil session panics
> ---------------------------------------
>
>                 Key: CASSGO-74
>                 URL: https://issues.apache.org/jira/browse/CASSGO-74
>             Project: Apache Cassandra Go driver
>          Issue Type: Bug
>          Components: Core
>            Reporter: Tyler Schade
>            Assignee: Tyler Schade
>            Priority: Normal
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The {{Session}} type does not guard against method calls on a nil pointer, which is understandable in most cases. However, the {{Close}} method doesn't have any work to do if the `Session` is nil, and could be easily guarded against panicking.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org