Skip to content

Commit

Permalink
Go to COOKIE_WAIT after T1-init start
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniels committed Feb 28, 2024
1 parent 32ef4a1 commit af23cc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion association.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ func (a *Association) init(isClient bool) {
go a.writeLoop()

if isClient {
a.setState(cookieWait)
init := &chunkInit{}
init.initialTSN = a.myNextTSN
init.numOutboundStreams = a.myMaxNumOutboundStreams
Expand All @@ -386,7 +385,9 @@ func (a *Association) init(isClient bool) {
a.log.Errorf("[%s] failed to send init: %s", a.name, err.Error())
}

// After sending the INIT chunk, "A" starts the T1-init timer and enters the COOKIE-WAIT state.
a.t1Init.start(a.rtoMgr.getRTO())
a.setState(cookieWait)
}
}

Expand Down Expand Up @@ -1155,6 +1156,7 @@ func (a *Association) handleInit(p *packet, i *chunkInit) ([]*packet, error) {
outbound.destinationPort = a.destinationPort

initAck := &chunkInitAck{}
a.log.Debug("sending INIT ACK")

initAck.initialTSN = a.myNextTSN
initAck.numOutboundStreams = a.myMaxNumOutboundStreams
Expand Down

0 comments on commit af23cc1

Please sign in to comment.