mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 16:31:56 +03:00
Merge pull request #447 from 9seconds/handshake-timeout
Add separate handshake timeout
This commit is contained in:
@@ -47,11 +47,6 @@ func ReadClientHello(
|
||||
hostname string,
|
||||
tolerateTimeSkewness time.Duration,
|
||||
) (*ClientHello, error) {
|
||||
if err := conn.SetReadDeadline(time.Now().Add(ClientHelloReadTimeout)); err != nil {
|
||||
return nil, fmt.Errorf("cannot set read deadline: %w", err)
|
||||
}
|
||||
defer conn.SetReadDeadline(resetDeadline) //nolint: errcheck
|
||||
|
||||
// This is how FakeTLS is organized:
|
||||
// 1. We create sha256 HMAC with a given secret
|
||||
// 2. We dump there a whole TLS frame except of the fact that random
|
||||
|
||||
Reference in New Issue
Block a user