Skip to content

Commit

Permalink
Fix Chrome datachannel stuck at closing
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-tao committed Sep 13, 2022
1 parent d0b7cf3 commit 1da1e70
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions association.go
Original file line number Diff line number Diff line change
Expand Up @@ -2022,13 +2022,23 @@ func (a *Association) resetStreamsIfAny(p *paramOutgoingResetRequest) *packet {
a.name, p.senderLastTSN, a.peerLastTSN)
result = reconfigResultInProgress
}

return a.createPacket([]chunk{&chunkReconfig{
paramA: &paramReconfigResponse{
reconfigResponseSequenceNumber: p.reconfigRequestSequenceNumber,
result: result,
rsn := a.generateNextRSN()
tsn := a.myNextTSN - 1
return a.createPacket([]chunk{
&chunkReconfig{
paramA: &paramReconfigResponse{
reconfigResponseSequenceNumber: p.reconfigRequestSequenceNumber,
result: result,
},
},
}})
&chunkReconfig{
paramA: &paramOutgoingResetRequest{
reconfigRequestSequenceNumber: rsn,
reconfigResponseSequenceNumber: p.reconfigRequestSequenceNumber,
senderLastTSN: tsn,
streamIdentifiers: p.streamIdentifiers,
},
}})
}

// Move the chunk peeked with a.pendingQueue.peek() to the inflightQueue.
Expand Down

0 comments on commit 1da1e70

Please sign in to comment.