diff --git a/client/rwc/websocket/fasthttp/client_rwc_handlers.go b/client/rwc/websocket/fasthttp/client_rwc_handlers.go index a0f6d93..5f4bc3d 100644 --- a/client/rwc/websocket/fasthttp/client_rwc_handlers.go +++ b/client/rwc/websocket/fasthttp/client_rwc_handlers.go @@ -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() { diff --git a/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go b/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go index 1599bac..fe2b1ab 100644 --- a/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go +++ b/server/rwc/websocket/fasthttp/servlet_rwc_handlers.go @@ -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 }