Make done channel buffered

This commit is contained in:
Deluan
2020-12-13 11:58:00 -05:00
parent d685aefab3
commit 1d338417e9
+1 -1
View File
@@ -140,7 +140,7 @@ func (b *broker) subscribe(r *http.Request) client {
address: r.RemoteAddr, address: r.RemoteAddr,
userAgent: r.UserAgent(), userAgent: r.UserAgent(),
channel: make(messageChan, 5), channel: make(messageChan, 5),
done: make(chan struct{}), done: make(chan struct{}, 1),
} }
// Signal the broker that we have a new client // Signal the broker that we have a new client