From c6d35856bc1ea71d428ac854191df5ac7275239c Mon Sep 17 00:00:00 2001 From: jdl Date: Mon, 15 Sep 2025 04:29:30 +0200 Subject: [PATCH] FSM logic cleanup --- peer/remotefsm.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/peer/remotefsm.go b/peer/remotefsm.go index 231b13a..6ea3e16 100644 --- a/peer/remotefsm.go +++ b/peer/remotefsm.go @@ -172,7 +172,6 @@ func (r *remoteFSM) stateServer_onSyn(msg controlMsg[packetSyn]) { // Before we can respond to this packet, we need to make sure the // route is setup properly. conf := r.conf() - logSyn := !conf.Up || conf.Direct != p.Direct conf.Up = true conf.Direct = p.Direct @@ -181,10 +180,7 @@ func (r *remoteFSM) stateServer_onSyn(msg controlMsg[packetSyn]) { conf.DataCipher = newDataCipherFromKey(p.SharedKey) r.updateConf(conf) - - if logSyn { - r.logf("Got SYN.") - } + r.logf("Got SYN.") r.sendControl(conf, packetAck{ TraceID: p.TraceID, @@ -316,7 +312,7 @@ func (r *remoteFSM) stateClientInit_onPing() stateFunc { func (r *remoteFSM) enterClient() stateFunc { conf := r.conf() - r.probes = make(map[uint64]sentProbe, 8) + clear(r.probes) r.traceID = r.NewTraceID() r.stateClient_sendSyn(conf)