Skip to content

Commit

Permalink
websocket: fix callback for nil close message
Browse files Browse the repository at this point in the history
  • Loading branch information
lesismal committed Jul 16, 2024
1 parent 882d08e commit ebb0bdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbhttp/websocket/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ func (c *Conn) Parse(data []byte) error {
c.handleDataFrame(msgType, fin, frame)
frame = nil
}
if protocolMessage != nil {
if fin && opcode == CloseMessage { //protocolMessage != nil {
c.handleProtocolMessage(opcode, protocolMessage)
protocolMessage = nil
}
Expand Down

0 comments on commit ebb0bdb

Please sign in to comment.