buptubuntu commented on a change in pull request #2497:
URL: https://github.com/apache/thrift/pull/2497#discussion_r780650303



##########
File path: lib/go/thrift/simple_server.go
##########
@@ -234,7 +250,9 @@ func (p *TSimpleServer) Stop() error {
        }
        atomic.StoreInt32(&p.closed, 1)
        p.serverTransport.Interrupt()
+       close(p.stopChan)
        p.wg.Wait()
+       p.stopChan = make(chan struct{})

Review comment:
       Because is stopped server can serve later, and the closed channel can 
not be closed again, so we have to make a new channel




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


Reply via email to