Skip to content

Commit

Permalink
websocket: enable/disable write compression as the remote does
Browse files Browse the repository at this point in the history
  • Loading branch information
lesismal committed Aug 28, 2023
1 parent 204def4 commit f6372ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nbhttp/websocket/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ func NewConn(u *Upgrader, c net.Conn, subprotocol string, remoteCompressionEnabl
subprotocol: subprotocol,
remoteCompressionEnabled: remoteCompressionEnabled,
}
wsc.EnableWriteCompression(remoteCompressionEnabled)
if asyncWrite {
wsc.sendQueue = make([][]byte, u.BlockingModSendQueueInitSize)[:0]
wsc.sendQueueSize = u.BlockingModSendQueueMaxSize
Expand Down

0 comments on commit f6372ad

Please sign in to comment.