You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In federation mode, when the TCP connection between nodes gets broken, (e.g. pull the cable out), all clients will hang until the client-side close the connection.
Here is the culprit:
CloseSend() will not close the underlying TCP connection of the gRPC streaming, it will wait for the response from the server and then close the connection.
if p.state == peerStateStreaming {
_ = p.stream.client.CloseSend()
}
This will cause p.stream.wg.Wait() to hang until the connection of the gRPC streaming timeout.
Add a cancelable context.Context should fix the problem.
In federation mode, when the TCP connection between nodes gets broken, (e.g. pull the cable out), all clients will hang until the client-side close the connection.
Here is the culprit:
gmqtt/plugin/federation/peer.go
Lines 173 to 186 in 0a2b151
CloseSend()
will not close the underlying TCP connection of the gRPC streaming, it will wait for the response from the server and then close the connection.This will cause
p.stream.wg.Wait()
to hang until the connection of the gRPC streaming timeout.Add a cancelable
context.Context
should fix the problem.related to #121
reference:
grpc/grpc-go#2015 (comment)
The text was updated successfully, but these errors were encountered: