start reader loop after connect
This commit is contained in:
parent
6ae3cf9df8
commit
3586f4d799
@ -30,6 +30,7 @@ type Websocket struct {
|
||||
conn *websocket.Conn
|
||||
clientID string
|
||||
msgID *uint64
|
||||
once sync.Once
|
||||
|
||||
subsMu sync.Mutex //todo sync.Map
|
||||
subs map[string]chan *message.Message
|
||||
@ -130,6 +131,8 @@ func (w *Websocket) Connect() error {
|
||||
Id: w.nextMsgID(),
|
||||
}
|
||||
//todo verify if extensions are applied on connect,verify if hs is complete
|
||||
|
||||
go w.readWorker()
|
||||
return w.sendMessage(&m)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user