diff --git a/net/ws.go b/net/ws.go index ace8c6f..95e15de 100644 --- a/net/ws.go +++ b/net/ws.go @@ -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) {