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
|
return nil
|
||||||
}
|
}
|
||||||
func (p *WebSocketPeer) EndForAbuse() error {
|
func (p *WebSocketPeer) EndForAbuse() error {
|
||||||
|
p.abused = true
|
||||||
err := p.socket.Close(websocket.StatusPolicyViolation, "")
|
err := p.socket.Close(websocket.StatusPolicyViolation, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
p.abused = true
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (p *WebSocketPeer) SetId(id *encoding.NodeId) {
|
func (p *WebSocketPeer) SetId(id *encoding.NodeId) {
|
||||||
|
|
Loading…
Reference in New Issue