worryg0d commented on code in PR #1822:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1822#discussion_r1812286553


##########
conn.go:
##########
@@ -694,7 +718,7 @@ func (c *Conn) recv(ctx context.Context) error {
        } else if head.stream == -1 {
                // TODO: handle cassandra event frames, we shouldnt get any 
currently
                framer := newFramer(c.compressor, c.version)
-               if err := framer.readFrame(c, &head); err != nil {
+               if err := framer.readFrame(r, &head); err != nil {
                        return err
                }
                go c.session.handleEvent(framer)

Review Comment:
   > Hmm this is the existing behavior though right?
   
   Right, it calls close of underlying conn, so the behavior is not changed. 
It's just a bit confusing for me that calling `Close()` on `ConnReader` affects 
`writerContext` as well because they both use the same `net.Conn`.
   
   > One thing we can do is remove the lower case Conn.close() because at the 
moment we have a Conn.Close() and a Conn.close(). The lower case one is just 
confusing, the Conn.Close() function should just call connReader.Close() 
   directly.
   
   I removed `Conn.close()` and added conn reader to this PR 
[a79c985](https://github.com/worryg0d/gocql/commit/a79c9853a50f2c6e2afc262be3a241e1bc1a97ff)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to