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.ctx, s.ctxCancel = context.WithCancel(context.Background())
|
||||||
s.handshakeCtx, s.handshakeCtxCancel = context.WithCancel(context.Background())
|
s.handshakeCtx, s.handshakeCtxCancel = context.WithCancel(context.Background())
|
||||||
|
|
||||||
s.timer = utils.NewTimer()
|
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
s.lastPacketReceivedTime = now
|
s.lastPacketReceivedTime = now
|
||||||
s.sessionCreationTime = now
|
s.sessionCreationTime = now
|
||||||
@@ -490,6 +489,8 @@ func (s *session) preSetup() {
|
|||||||
func (s *session) run() error {
|
func (s *session) run() error {
|
||||||
defer s.ctxCancel()
|
defer s.ctxCancel()
|
||||||
|
|
||||||
|
s.timer = utils.NewTimer()
|
||||||
|
|
||||||
go s.cryptoStreamHandler.RunHandshake()
|
go s.cryptoStreamHandler.RunHandshake()
|
||||||
go func() {
|
go func() {
|
||||||
if err := s.sendQueue.Run(); err != nil {
|
if err := s.sendQueue.Run(); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user