forked from quic-go/quic-go
release the packet buffer after sending a CONNECTION_CLOSE in the server
This commit is contained in:
@@ -436,6 +436,7 @@ func (s *baseServer) handleInitialImpl(p *receivedPacket, hdr *wire.Header) erro
|
|||||||
if queueLen := atomic.LoadInt32(&s.sessionQueueLen); queueLen >= protocol.MaxAcceptQueueSize {
|
if queueLen := atomic.LoadInt32(&s.sessionQueueLen); queueLen >= protocol.MaxAcceptQueueSize {
|
||||||
s.logger.Debugf("Rejecting new connection. Server currently busy. Accept queue length: %d (max %d)", queueLen, protocol.MaxAcceptQueueSize)
|
s.logger.Debugf("Rejecting new connection. Server currently busy. Accept queue length: %d (max %d)", queueLen, protocol.MaxAcceptQueueSize)
|
||||||
go func() {
|
go func() {
|
||||||
|
defer p.buffer.Release()
|
||||||
if err := s.sendConnectionRefused(p.remoteAddr, hdr); err != nil {
|
if err := s.sendConnectionRefused(p.remoteAddr, hdr); err != nil {
|
||||||
s.logger.Debugf("Error rejecting connection: %s", err)
|
s.logger.Debugf("Error rejecting connection: %s", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user