FSM logic cleanup
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user