forked from quic-go/quic-go
start running TLS server session directly when creating them
This commit is contained in:
@@ -165,11 +165,9 @@ func (s *server) setupTLS() error {
|
||||
case <-s.errorChan:
|
||||
return
|
||||
case tlsSession := <-sessionChan:
|
||||
sess := tlsSession.sess
|
||||
// The connection ID is a randomly chosen 8 byte value.
|
||||
// It is safe to assume that it doesn't collide with other randomly chosen values.
|
||||
s.sessionHandler.Add(tlsSession.connID, sess)
|
||||
go sess.run()
|
||||
s.sessionHandler.Add(tlsSession.connID, tlsSession.sess)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user