don't export the qlog file when receiving a Version Negotiation packet

This commit is contained in:
Marten Seemann 2020-04-07 17:02:23 +07:00
parent bb2a05af0a
commit 44eb324101
2 changed files with 6 additions and 6 deletions

View file

@ -600,14 +600,14 @@ runLoop:
}
s.handleCloseError(closeErr)
if closeErr.err != errCloseForRecreating && s.qlogger != nil {
if err := s.qlogger.Export(); err != nil {
s.logger.Errorf("exporting qlog failed: %s", err)
}
}
s.logger.Infof("Connection %s closed.", s.logID)
s.cryptoStreamHandler.Close()
s.sendQueue.Close()
if s.qlogger != nil {
if err := s.qlogger.Export(); err != nil {
return err
}
}
return closeErr.err
}

View file

@ -480,7 +480,7 @@ var _ = Describe("Session", func() {
sessionRunner.EXPECT().Remove(gomock.Any()).AnyTimes()
cryptoSetup.EXPECT().Close()
// don't EXPECT any calls to mconn.Write()
qlogger.EXPECT().Export()
// don't EXPECT any call to qlogger.Export()
sess.closeForRecreating()
Eventually(areSessionsRunning).Should(BeFalse())
expectedRunErr = errCloseForRecreating