Skip to content

Commit

Permalink
dht_net: resetHard on invalidate
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 20, 2017
1 parent 2f57cb2 commit c98efab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dht_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ const requestResultBuffer = 64
func (ms *messageSender) invalidate() {
ms.invalid = true
if ms.s != nil {
ms.s.Reset()
ms.s = nil
ms.resetHard()
}
}

Expand All @@ -194,6 +193,7 @@ func (ms *messageSender) prep() error {
if ms.invalid {
return fmt.Errorf("message sender has been invalidated")
}

if ms.s != nil {
return nil
}
Expand Down

0 comments on commit c98efab

Please sign in to comment.