fix: flag abused before closing
This commit is contained in:
parent
c2ab3b4651
commit
7d34ac37db
|
@ -105,13 +105,12 @@ func (p *WebSocketPeer) End() error {
|
|||
return nil
|
||||
}
|
||||
func (p *WebSocketPeer) EndForAbuse() error {
|
||||
p.abused = true
|
||||
err := p.socket.Close(websocket.StatusPolicyViolation, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
p.abused = true
|
||||
|
||||
return nil
|
||||
}
|
||||
func (p *WebSocketPeer) SetId(id *encoding.NodeId) {
|
||||
|
|
Loading…
Reference in New Issue