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


##########
events.go:
##########
@@ -204,13 +406,13 @@ func (s *Session) handleNodeEvent(frames []frame) {
                // ignore events we received if they were disabled
                // see 
https://github.com/apache/cassandra-gocql-driver/issues/1591
                switch f.change {
-               case "UP":
+               case nodeStateChangeUp:
                        if !s.cfg.Events.DisableNodeStatusEvents {
                                s.handleNodeUp(f.host, f.port)
                        }
-               case "DOWN":
+               case nodeStateChangeDown:
                        if !s.cfg.Events.DisableNodeStatusEvents {
-                               s.handleNodeDown(f.host, f.port)
+                               s.suggestNodeDown(f.host, f.port)

Review Comment:
   I'm unsure if we actually should change this behavior. Previously, this was 
called at least **2** times when the node went DOWN. The second call happens 
when gocql fails to read data from the conn in `Conn.recv()` -> 
`readCompressedSegment(c.r, c.compressor)`, `readUncompressedSegment(c.r)` for 
proto 5, and `readHeader(r, c.headerBuf[:])` for proto < 5.



-- 
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