logging
This commit is contained in:
parent
091141cbb0
commit
10d8ee13ab
|
@ -56,16 +56,6 @@ func WSHandler(w http.ResponseWriter, r *http.Request) {
|
|||
args := map[string]interface{}{}
|
||||
for {
|
||||
if err := session.EditorWS[sid].ReadJSON(&args); err != nil {
|
||||
if err.Error() == "EOF" {
|
||||
return
|
||||
}
|
||||
|
||||
if err.Error() == "unexpected EOF" {
|
||||
return
|
||||
}
|
||||
|
||||
glog.Error("Editor WS ERROR: " + err.Error())
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -114,16 +114,6 @@ func WSHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
for {
|
||||
if err := wsChan.ReadJSON(&input); err != nil {
|
||||
if err.Error() == "EOF" {
|
||||
return
|
||||
}
|
||||
|
||||
if err.Error() == "unexpected EOF" {
|
||||
return
|
||||
}
|
||||
|
||||
glog.Error("Notification WS ERROR: " + err.Error())
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,8 @@ func WSHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
for {
|
||||
if err := wsChan.ReadJSON(&input); err != nil {
|
||||
glog.V(3).Infof("[Session Channel] of session [%s] disconnected, releases all resources with it", sid)
|
||||
glog.V(3).Infof("[Session Channel] of session [%s] disconnected, releases all resources with it, user [%s]",
|
||||
sid, wSession.Username)
|
||||
|
||||
WideSessions.Remove(sid)
|
||||
|
||||
|
@ -151,6 +152,7 @@ func WSHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if err := wsChan.WriteJSON(&ret); err != nil {
|
||||
glog.Error("Session WS ERROR: " + err.Error())
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -103,14 +103,6 @@ func WSHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
for {
|
||||
if err := wsChan.ReadJSON(&input); err != nil {
|
||||
if err.Error() == "EOF" {
|
||||
return
|
||||
}
|
||||
|
||||
if err.Error() == "unexpected EOF" {
|
||||
return
|
||||
}
|
||||
|
||||
glog.Error("Shell WS ERROR: " + err.Error())
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue