From 0043008ad06bbeda4b037f2959f2c9cf1b55d65b Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Thu, 13 Jul 2017 21:29:22 +0200 Subject: [PATCH] Endpoint discovery from handshake initiation --- src/receive.go | 6 ++++++ 1 file changed, 6 insertions(+) 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)