This commit is contained in:
crusader 2018-03-23 19:58:35 +09:00
parent 00cff36194
commit 32361ec6f4
2 changed files with 15 additions and 0 deletions

View File

@ -32,6 +32,9 @@ func (crwch *ClientReadWriteCloseHandlers) ReadResponse(clientCTX client.ClientC
_, r, err := soc.NextReader()
if nil != err {
if websocket.IsUnexpectedCloseError(err) {
return nil, io.EOF
}
return nil, err
}
@ -47,6 +50,9 @@ func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX client.ClientC
wc, wErr = soc.NextWriter(websocket.TextMessage)
if nil != wErr {
if websocket.IsUnexpectedCloseError(wErr) {
return io.EOF
}
return wErr
}
defer func() {

View File

@ -22,6 +22,9 @@ func (srwch *ServletReadWriteCloseHandlers) ReadRequest(servletCTX rpc.ServletCo
_, r, err := soc.NextReader()
if nil != err {
if websocket.IsUnexpectedCloseError(err) {
return nil, io.EOF
}
return nil, err
}
@ -37,6 +40,9 @@ func (srwch *ServletReadWriteCloseHandlers) WriteResponse(servletCTX rpc.Servlet
wc, wErr = soc.NextWriter(websocket.TextMessage)
if nil != wErr {
if websocket.IsUnexpectedCloseError(wErr) {
return io.EOF
}
return wErr
}
@ -62,6 +68,9 @@ func (srwch *ServletReadWriteCloseHandlers) WriteNotification(servletCTX rpc.Ser
wc, wErr = soc.NextWriter(websocket.TextMessage)
if nil != wErr {
if websocket.IsUnexpectedCloseError(wErr) {
return io.EOF
}
return wErr
}