File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -524,6 +524,7 @@ func (p *Protocol) recvLoop() {
524524
525525func (p * Protocol ) stateLoop (ch <- chan protocolStateTransition ) {
526526 var transitionTimer * time.Timer
527+ var initialStateSet bool
527528
528529 setState := func (s State ) {
529530 // Disable any previous state transition timer
@@ -573,6 +574,11 @@ func (p *Protocol) stateLoop(ch <-chan protocolStateTransition) {
573574 }
574575 }
575576
577+ // Don't activate timeouts on initial protocol state
578+ if ! initialStateSet {
579+ return
580+ }
581+
576582 // Set timeout for state transition
577583 if p .config .StateMap [s ].Timeout > 0 {
578584 transitionTimer = time .NewTimer (
@@ -587,7 +593,9 @@ func (p *Protocol) stateLoop(ch <-chan protocolStateTransition) {
587593 return transitionTimer .C
588594 }
589595
596+ // Set initial state
590597 setState (p .config .InitialState )
598+ initialStateSet = true
591599
592600 for {
593601 select {
You can’t perform that action at this time.
0 commit comments