#859·websocket

[BUG] websocket on compress close duplicate

Author: t0jcCreated Oct 30, 2023Updated Nov 13, 2025
Labelsbug

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

in this line https://github.com/gorilla/websocket/blob/ac0789be11725ab2285233e9a3800c2312cff4fc/compression.go#L138

and this line https://github.com/gorilla/websocket/blob/ac0789be11725ab2285233e9a3800c2312cff4fc/conn.go#L1024

Expected Behavior

if close duplicate will report this log

2023/10/30 21:56:02 websocket: discarding reader close error: io: read/write on closed pipe

Steps To Reproduce

  1. create websocket link with "EnableCompression"
  2. use this websocket write someting
  3. in server side got log "websocket: discarding reader close error: io: read/write on closed pipe"

Anything else?

2023/10/30 21:56:02 websocket: discarding reader close error: io: read/write on closed pipe