diff --git a/hostmap.go b/hostmap.go index 6b726c1..7646d23 100644 --- a/hostmap.go +++ b/hostmap.go @@ -397,10 +397,6 @@ func (hm *HostMap) Punchy(ctx context.Context, conn *udp.Conn) { } } -func (i *HostInfo) BindConnectionState(cs *ConnectionState) { - i.ConnectionState = cs -} - // TryPromoteBest handles re-querying lighthouses and probing for better paths // NOTE: It is an error to call this if you are a lighthouse since they should not roam clients! func (i *HostInfo) TryPromoteBest(preferredRanges []*net.IPNet, ifce *Interface) { @@ -541,10 +537,6 @@ func (i *HostInfo) SetRemoteIfPreferred(hm *HostMap, newRemote *udp.Addr) bool { return false } -func (i *HostInfo) ClearConnectionState() { - i.ConnectionState = nil -} - func (i *HostInfo) RecvErrorExceeded() bool { if i.recvError < 3 { i.recvError += 1 diff --git a/outside.go b/outside.go index a081ec0..e0dba7d 100644 --- a/outside.go +++ b/outside.go @@ -349,12 +349,9 @@ func (f *Interface) handleRecvError(addr *udp.Addr, h *header.H) { return } - // We delete this host from the main hostmap - f.hostMap.DeleteHostInfo(hostinfo) - // We also delete it from pending to allow for - // fast reconnect. We must null the connectionstate - // or a counter reuse may happen - hostinfo.ConnectionState = nil + f.closeTunnel(hostinfo, false) + // We also delete it from pending hostmap to allow for + // fast reconnect. f.handshakeManager.DeleteHostInfo(hostinfo) }