Skip to content

Commit

Permalink
client: Drop syscall.ECONNRESET hack from Client.readOnce
Browse files Browse the repository at this point in the history
Closes #397
  • Loading branch information
foxcpp authored and emersion committed Oct 22, 2020
1 parent baf4272 commit f9d60f8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"net"
"os"
"sync"
"syscall"
"time"

"github.com/emersion/go-imap"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f9d60f8

Please sign in to comment.