diff --git a/server.go b/server.go index fcd1cc66..d3e956af 100644 --- a/server.go +++ b/server.go @@ -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)