From f9d60f89af325b88ac34e26a147d83719aed00ef Mon Sep 17 00:00:00 2001 From: "fox.cpp" Date: Thu, 22 Oct 2020 17:21:02 +0300 Subject: [PATCH] client: Drop syscall.ECONNRESET hack from Client.readOnce Closes #397 --- client/client.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/client/client.go b/client/client.go index d08441ba..8b6fc841 100644 --- a/client/client.go +++ b/client/client.go @@ -13,7 +13,6 @@ import ( "net" "os" "sync" - "syscall" "time" "github.com/emersion/go-imap" @@ -152,13 +151,6 @@ func (c *Client) readOnce() (bool, error) { if err == io.EOF || c.State() == imap.LogoutState { return false, nil } else if err != nil { - if opErr, ok := err.(*net.OpError); ok { - if syscallErr, ok := opErr.Err.(*os.SyscallError); ok { - if syscallErr.Err == syscall.ECONNRESET { - return false, nil - } - } - } if imap.IsParseError(err) { return true, err } else {