forked from quic-go/quic-go
remove unneeded check for nil packets in session.sendConnectionClose
This was needed when logic in the packet packer was a lot more complicated. Now that packing a CONNECTION_CLOSE is a separate code path, this check isn't needed anymore.
This commit is contained in:
@@ -704,9 +704,6 @@ func (s *session) sendConnectionClose(quicErr *qerr.QuicError) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if packet == nil {
|
||||
return errors.New("Session BUG: expected packet not to be nil")
|
||||
}
|
||||
s.logPacket(packet)
|
||||
return s.conn.Write(packet.raw)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user