Skip to content

Commit

Permalink
Merge pull request #5 from erigontech/ban_as_drop
Browse files Browse the repository at this point in the history
Implement ban as drop rather than close
  • Loading branch information
mh0lt authored May 6, 2024
2 parents 7f901bc + 8468c0f commit c5a9913
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions webseed-peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ func (ws *webseedPeer) connectionFlags() string {
return "WS"
}

// Maybe this should drop all existing connections, or something like that.
func (ws *webseedPeer) drop() {}
func (ws *webseedPeer) drop() {
ws.peer.cancelAllRequests()
}

func (cn *webseedPeer) ban() {
cn.peer.close()
cn.peer.drop()
}

func (ws *webseedPeer) handleUpdateRequests() {
Expand Down

0 comments on commit c5a9913

Please sign in to comment.