summaryrefslogtreecommitdiffhomepage
path: root/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/peer.go b/peer.go
index a279d96..228dc5e 100644
--- a/peer.go
+++ b/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()
+}