mirror of https://github.com/perkeep/perkeep.git
search: fix websocket crash
Fixes #563 Change-Id: Iff04e4a40406ddd391f3c8fc93dcfe0209806ee3
This commit is contained in:
parent
3026631521
commit
5c2ad4eaae
|
@ -57,8 +57,8 @@ type wsHub struct {
|
|||
func newWebsocketHub(sh *Handler) *wsHub {
|
||||
return &wsHub{
|
||||
sh: sh,
|
||||
register: make(chan *wsConn, buffered),
|
||||
unregister: make(chan *wsConn, buffered),
|
||||
register: make(chan *wsConn), // unbuffered; issue 563
|
||||
unregister: make(chan *wsConn), // unbuffered; issue 563
|
||||
conns: make(map[*wsConn]bool),
|
||||
watchReq: make(chan watchReq, buffered),
|
||||
newBlobRecv: make(chan string, buffered),
|
||||
|
@ -173,6 +173,7 @@ type wsConn struct {
|
|||
send chan []byte // Buffered channel of outbound messages.
|
||||
sh *Handler
|
||||
|
||||
// queries is owned by the wsHub.run goroutine.
|
||||
queries map[string]*watchedQuery // tag -> subscription
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue