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 4d16c7f
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions association.go
Original file line number Diff line number Diff line change
Expand Up @@ -2022,13 +2022,24 @@ 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{
paramHeader: paramHeader{},
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 4d16c7f

Please sign in to comment.