Make done channel buffered

This commit is contained in:
Deluan 2020-12-13 11:58:00 -05:00 committed by Joe Stump
parent 7aa8b6418e
commit 60605f8d1b
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -140,7 +140,7 @@ func (b *broker) subscribe(r *http.Request) client {
address: r.RemoteAddr,
userAgent: r.UserAgent(),
channel: make(messageChan, 5),
done: make(chan struct{}),
done: make(chan struct{}, 1),
}
// Signal the broker that we have a new client