This commit is contained in:
Liang Ding 2014-11-20 22:53:54 +08:00
parent 091141cbb0
commit 10d8ee13ab
4 changed files with 3 additions and 29 deletions

View File

@ -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
}

View File

@ -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
}
}

View File

@ -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
}

View File

@ -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