close ws connection on Stop

This commit is contained in:
Anton Kaliaev
2017-03-21 20:47:12 +04:00
parent b54b9b4ecc
commit afc39febed
2 changed files with 5 additions and 1 deletions

View File

@ -85,6 +85,8 @@ func (wsc *WSClient) dial() error {
func (wsc *WSClient) OnStop() {
wsc.BaseService.OnStop()
wsc.Conn.Close()
wsc.Conn = nil
// ResultsCh/ErrorsCh is closed in receiveEventsRoutine.
}