forked from quic-go/quic-go
use a single Go routine to send copies of CONNECTION_CLOSE packets
This commit is contained in:
@@ -95,7 +95,7 @@ type connRunner interface {
|
||||
GetStatelessResetToken(protocol.ConnectionID) protocol.StatelessResetToken
|
||||
Retire(protocol.ConnectionID)
|
||||
Remove(protocol.ConnectionID)
|
||||
ReplaceWithClosed([]protocol.ConnectionID, packetHandler)
|
||||
ReplaceWithClosed([]protocol.ConnectionID, protocol.Perspective, []byte)
|
||||
AddResetToken(protocol.StatelessResetToken, packetHandler)
|
||||
RemoveResetToken(protocol.StatelessResetToken)
|
||||
}
|
||||
@@ -1521,7 +1521,7 @@ func (s *connection) handleCloseError(closeErr *closeError) {
|
||||
|
||||
// If this is a remote close we're done here
|
||||
if closeErr.remote {
|
||||
s.connIDGenerator.ReplaceWithClosed(newClosedRemoteConn(s.perspective))
|
||||
s.connIDGenerator.ReplaceWithClosed(s.perspective, nil)
|
||||
return
|
||||
}
|
||||
if closeErr.immediate {
|
||||
@@ -1538,8 +1538,7 @@ func (s *connection) handleCloseError(closeErr *closeError) {
|
||||
if err != nil {
|
||||
s.logger.Debugf("Error sending CONNECTION_CLOSE: %s", err)
|
||||
}
|
||||
cs := newClosedLocalConn(s.conn, connClosePacket, s.perspective, s.logger)
|
||||
s.connIDGenerator.ReplaceWithClosed(cs)
|
||||
s.connIDGenerator.ReplaceWithClosed(s.perspective, connClosePacket)
|
||||
}
|
||||
|
||||
func (s *connection) dropEncryptionLevel(encLevel protocol.EncryptionLevel) {
|
||||
|
||||
Reference in New Issue
Block a user