Clean up bits added to debug peer connection close hang. (#4114)
This commit is contained in:
@@ -199,26 +199,12 @@ func NewTransportManager(params TransportManagerParams) (*TransportManager, erro
|
||||
}
|
||||
|
||||
func (t *TransportManager) Close() {
|
||||
var publisherClosed atomic.Bool
|
||||
var subscriberClosed atomic.Bool
|
||||
time.AfterFunc(time.Minute, func() { // CLOSE-DEBUG-CLEANUP
|
||||
if !publisherClosed.Load() || !subscriberClosed.Load() {
|
||||
t.params.Logger.Infow(
|
||||
"transport maanager close timeout",
|
||||
"publisherClosed", publisherClosed.Load(),
|
||||
"subscriberClosed", subscriberClosed.Load(),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
if t.publisher != nil {
|
||||
t.publisher.Close()
|
||||
}
|
||||
publisherClosed.Store(true)
|
||||
if t.subscriber != nil {
|
||||
t.subscriber.Close()
|
||||
}
|
||||
subscriberClosed.Store(true)
|
||||
}
|
||||
|
||||
func (t *TransportManager) SubscriberClose() {
|
||||
|
||||
Reference in New Issue
Block a user