forked from quic-go/quic-go
create the session timer at the beginning of the run loop
This commit is contained in:
@@ -472,7 +472,6 @@ func (s *session) preSetup() {
|
||||
s.ctx, s.ctxCancel = context.WithCancel(context.Background())
|
||||
s.handshakeCtx, s.handshakeCtxCancel = context.WithCancel(context.Background())
|
||||
|
||||
s.timer = utils.NewTimer()
|
||||
now := time.Now()
|
||||
s.lastPacketReceivedTime = now
|
||||
s.sessionCreationTime = now
|
||||
@@ -490,6 +489,8 @@ func (s *session) preSetup() {
|
||||
func (s *session) run() error {
|
||||
defer s.ctxCancel()
|
||||
|
||||
s.timer = utils.NewTimer()
|
||||
|
||||
go s.cryptoStreamHandler.RunHandshake()
|
||||
go func() {
|
||||
if err := s.sendQueue.Run(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user