fix: flag abused before closing

This commit is contained in:
Derrick Hammer 2024-01-15 13:40:41 -05:00
parent c2ab3b4651
commit 7d34ac37db
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 2 deletions

View File

@ -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) {