You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/09 03:57:30 UTC

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #663: [Issue 662] Fix race in connection.go waitUntilReady()

cckellogg commented on a change in pull request #663:
URL: https://github.com/apache/pulsar-client-go/pull/663#discussion_r745270617



##########
File path: pulsar/internal/connection.go
##########
@@ -327,8 +327,8 @@ func (c *connection) doHandshake() bool {
 }
 
 func (c *connection) waitUntilReady() error {
-	c.Lock()
-	defer c.Unlock()
+	c.cond.L.Lock()

Review comment:
       Curious what's the difference between doing `c.Lock()` vs `c.cond.L.Lock()`? Same for the changeState function? From looking at the code they should share the same lock?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org