don't read heartbeats with a context that expires

This commit is contained in:
Branden J Brown 2024-02-02 21:05:19 -06:00
parent 9beb0c989e
commit 5df96a5c33
1 changed files with 2 additions and 2 deletions

View File

@ -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
} }
} }