don't read heartbeats with a context that expires
This commit is contained in:
parent
9beb0c989e
commit
5df96a5c33
@ -199,8 +199,8 @@ func (s *Server) joinAndServe(p person) {
|
||||
ctx, stop := context.WithTimeoutCause(context.Background(), 10*time.Minute, errQueueEmpty)
|
||||
go func() {
|
||||
for {
|
||||
_, _, err := p.conn.Read(ctx)
|
||||
if err != nil {
|
||||
_, _, err := p.conn.Read(context.Background())
|
||||
if err != nil || ctx.Err() != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user