rueian commented on a change in pull request #473:
URL: https://github.com/apache/pulsar-client-go/pull/473#discussion_r585227138
##########
File path: pulsar/internal/connection.go
##########
@@ -331,10 +331,10 @@ func (c *connection) waitUntilReady() error {
}
func (c *connection) failLeftRequestsWhenClose() {
+ close(c.incomingRequestsCh)
Review comment:
Sadly, the workaround won't work. You can test the following code with
recent golang versions. It will panic very quickly.
```golang
func main() {
c1 := make(chan struct{})
c2 := make(chan struct{})
close(c1)
close(c2)
for {
select {
case <-c1:
case c2 <- struct{}{}:
}
}
}
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]