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)
|
ctx, stop := context.WithTimeoutCause(context.Background(), 10*time.Minute, errQueueEmpty)
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
_, _, err := p.conn.Read(ctx)
|
_, _, err := p.conn.Read(context.Background())
|
||||||
if err != nil {
|
if err != nil || ctx.Err() != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user