summaryrefslogtreecommitdiffhomepage
path: root/src/receive.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-13 21:29:22 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-13 21:29:22 +0200
commit0043008ad06bbeda4b037f2959f2c9cf1b55d65b (patch)
treedb5010c44c65e33cd2b147fe9fb1e67c226e7518 /src/receive.go
parent93e3848ea76e755477bec8d9540a3c4c31ea7320 (diff)
Endpoint discovery from handshake initiation
Diffstat (limited to 'src/receive.go')
-rw-r--r--src/receive.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/receive.go b/src/receive.go
index 3e649b6..f2bf70b 100644
--- a/src/receive.go
+++ b/src/receive.go
@@ -356,6 +356,12 @@ func (device *Device) RoutineHandshake() {
return
}
+ // update endpoint
+
+ peer.mutex.Lock()
+ peer.endpoint = elem.source
+ peer.mutex.Unlock()
+
// create response
response, err := device.CreateMessageResponse(peer)