diff --git a/client/rwc/websocket/fasthttp/client_rwc_handlers.go b/client/rwc/websocket/fasthttp/client_rwc_handlers.go index 67eb54d..ae7bc56 100644 --- a/client/rwc/websocket/fasthttp/client_rwc_handlers.go +++ b/client/rwc/websocket/fasthttp/client_rwc_handlers.go @@ -32,10 +32,10 @@ func (crwch *ClientReadWriteCloseHandlers) ReadResponse(clientCTX client.ClientC _, buf, err := soc.ReadMessage() if nil != err { - if websocket.IsUnexpectedCloseError(err) { - return nil, io.EOF + if !websocket.IsUnexpectedCloseError(err) { + logging.Logger().Errorf("RPC: %v", err) } - return nil, err + return nil, io.EOF } return codec.NewResponse(buf) @@ -56,9 +56,9 @@ func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX client.ClientC wErr = soc.WriteMessage(websocket.TextMessage, buf) if nil != wErr { if websocket.IsUnexpectedCloseError(wErr) { - return io.EOF + logging.Logger().Errorf("RPC: %v", wErr) } - return wErr + return io.EOF } return nil diff --git a/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go b/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go index ad9099a..769e1f6 100644 --- a/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go +++ b/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go @@ -3,6 +3,7 @@ package fasthttp import ( "io" + "git.loafle.net/commons_go/logging" "git.loafle.net/commons_go/rpc" "git.loafle.net/commons_go/rpc/protocol" cwf "git.loafle.net/commons_go/websocket_fasthttp" @@ -23,9 +24,9 @@ func (srwch *ServletReadWriteCloseHandlers) ReadRequest(servletCTX rpc.ServletCo _, buf, err := soc.ReadMessage() if nil != err { if websocket.IsUnexpectedCloseError(err) { - return nil, io.EOF + logging.Logger().Errorf("RPC: %v", err) } - return nil, err + return nil, io.EOF } return codec.NewRequest(buf) @@ -54,9 +55,9 @@ func (srwch *ServletReadWriteCloseHandlers) WriteResponse(servletCTX rpc.Servlet wErr = soc.WriteMessage(websocket.TextMessage, buf) if nil != wErr { if websocket.IsUnexpectedCloseError(wErr) { - return io.EOF + logging.Logger().Errorf("RPC: %v", wErr) } - return wErr + return io.EOF } return nil @@ -77,9 +78,9 @@ func (srwch *ServletReadWriteCloseHandlers) WriteNotification(servletCTX rpc.Ser wErr = soc.WriteMessage(websocket.TextMessage, buf) if nil != wErr { if websocket.IsUnexpectedCloseError(wErr) { - return io.EOF + logging.Logger().Errorf("RPC: %v", wErr) } - return wErr + return io.EOF } return nil