diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-26 02:59:26 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-27 22:55:15 +0200 |
commit | fc3a7635e56a336ae06277ce3157b1b14fdd2fa8 (patch) | |
tree | f11ddb7168799c81fc6f5a73949a58e646d627a2 /peer.go | |
parent | 2496cdd8e6078e2a6955b7facb239e4cf2fe5e55 (diff) |
Disappointing anti-sticky experiment
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() +} |