Fix EOF error

This commit is contained in:
Julien Salleyron 2019-04-08 12:24:05 +02:00 committed by Traefiker Bot
parent 8b4efa1760
commit ef8894ef26

View file

@ -161,7 +161,9 @@ func (c *Conn) Read(p []byte) (n int, err error) {
func clientHelloServerName(br *bufio.Reader) (string, bool, string) { func clientHelloServerName(br *bufio.Reader) (string, bool, string) {
hdr, err := br.Peek(1) hdr, err := br.Peek(1)
if err != nil { if err != nil {
if err != io.EOF {
log.Errorf("Error while Peeking first byte: %s", err) log.Errorf("Error while Peeking first byte: %s", err)
}
return "", false, "" return "", false, ""
} }
const recordTypeHandshake = 0x16 const recordTypeHandshake = 0x16