Use net.ErrClosed
Go 1.16 has introduced net.ErrClosed, which should be returned/wrapped when an I/O call is performed on a network connection which has already been closed. This is useful to avoid cluttering logs with messages like "failed to close WebSocket: already wrote close". Closes: https://github.com/nhooyr/websocket/issues/286
close_go113.go
0 → 100644
close_go116.go
0 → 100644
Please register or sign in to comment