rename confusingly named variable in the server

This commit is contained in:
Marten Seemann 2020-10-07 17:26:54 +07:00
parent 5d2b87e819
commit 350a3dbef8

View file

@ -225,7 +225,7 @@ func (s *baseServer) run() {
case <-s.errorChan:
return
case p := <-s.receivedPackets:
if shouldReleaseBuffer := s.handlePacketImpl(p); !shouldReleaseBuffer {
if bufferStillInUse := s.handlePacketImpl(p); !bufferStillInUse {
p.buffer.Release()
}
}
@ -320,7 +320,7 @@ func (s *baseServer) handlePacket(p *receivedPacket) {
}
}
func (s *baseServer) handlePacketImpl(p *receivedPacket) bool /* should the buffer be released */ {
func (s *baseServer) handlePacketImpl(p *receivedPacket) bool /* is the buffer still in use? */ {
// If we're creating a new session, the packet will be passed to the session.
// The header will then be parsed again.
hdr, _, _, err := wire.ParsePacket(p.data, s.config.ConnectionIDLength)