bschofield commented on a change in pull request #663:
URL: https://github.com/apache/pulsar-client-go/pull/663#discussion_r745414797
##########
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:
I agree that `waitUntilReady()` and `changeState()` should share the
same lock. I also agree that `waitUntilReady()` and `changeState()` should
share the same lock. I think the correct lock to use is `c.cond.L`, for the
reasons given in the main discussion.
##########
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:
I agree that `waitUntilReady()` and `changeState()` 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]