[FIX] event websocket all return ok

This commit is contained in:
goodrain 2018-01-24 18:04:42 +08:00
parent 9b5d91e66d
commit 69b38f6c11

View File

@ -210,6 +210,7 @@ func (s *SocketServer) pushDockerLog(w http.ResponseWriter, r *http.Request) {
s.log.Debug("Push docker log message request closed")
s.storemanager.RealseWebSocketMessageChan("docker", ServiceID, SubID)
}()
conn.WriteMessage(websocket.TextMessage, []byte("ok"))
stop := make(chan struct{})
go s.reader(conn, stop)
pingTicker := time.NewTicker(s.timeout * 8 / 10)
@ -292,6 +293,7 @@ func (s *SocketServer) pushMonitorMessage(w http.ResponseWriter, r *http.Request
s.log.Debug("Push docker log message request closed")
s.storemanager.RealseWebSocketMessageChan("monitor", ServiceID, SubID)
}()
conn.WriteMessage(websocket.TextMessage, []byte("ok"))
stop := make(chan struct{})
go s.reader(conn, stop)
pingTicker := time.NewTicker(s.timeout * 8 / 10)
@ -374,6 +376,7 @@ func (s *SocketServer) pushNewMonitorMessage(w http.ResponseWriter, r *http.Requ
s.log.Debug("Push new monitor message request closed")
s.storemanager.RealseWebSocketMessageChan("newmonitor", ServiceID, SubID)
}()
conn.WriteMessage(websocket.TextMessage, []byte("ok"))
stop := make(chan struct{})
go s.reader(conn, stop)
pingTicker := time.NewTicker(s.timeout * 8 / 10)