Make `done` channel buffered

This commit is contained in:
Deluan 2020-12-13 11:58:00 -05:00
parent d685aefab3
commit 1d338417e9
1 changed files with 1 additions and 1 deletions

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