Disappointing anti-sticky experiment
This commit is contained in:
parent
2496cdd8e6
commit
fc3a7635e5
4 changed files with 22 additions and 29 deletions
11
peer.go
11
peer.go
|
|
@ -258,3 +258,14 @@ func (peer *Peer) Stop() {
|
|||
|
||||
peer.ZeroAndFlushAll()
|
||||
}
|
||||
|
||||
var roamingDisabled bool
|
||||
|
||||
func (peer *Peer) SetEndpointFromPacket(endpoint Endpoint) {
|
||||
if roamingDisabled {
|
||||
return
|
||||
}
|
||||
peer.mutex.Lock()
|
||||
peer.endpoint = endpoint
|
||||
peer.mutex.Unlock()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue