diff options
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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() +} |