0
0
mirror of https://github.com/XTLS/REALITY.git synced 2025-08-22 14:38:35 +00:00

Handle handshake err

This commit is contained in:
风扇滑翔翼 2025-06-04 16:02:09 +00:00 committed by GitHub
parent 7c1cc2cde4
commit f953a50042
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,7 @@ func DetectRecordFingerprint(target string) ([]int, error) {
ServerName: host,
}
tlsConn := tls.Client(conn, tlsConfig)
err = tlsConn.Handshake()
if err != nil {
return nil, err
}
@ -72,8 +73,8 @@ func (c *detectConn) Read(b []byte) (n int, err error) {
}
}
if len(result) != 1 {
c.done = true
c.resultChan <- result
c.done = true
c.resultChan <- result
}
}
return n, err