aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/connect.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/imap/connect.go')
-rw-r--r--worker/imap/connect.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/worker/imap/connect.go b/worker/imap/connect.go
index 818952ac..79254bb9 100644
--- a/worker/imap/connect.go
+++ b/worker/imap/connect.go
@@ -123,19 +123,13 @@ func newTCPConn(addr string, timeout time.Duration) (*net.TCPConn, error) {
done := make(chan tcpConn)
go func() {
defer log.PanicHandler()
- addr, err := net.ResolveTCPAddr("tcp", addr)
- if err != nil {
- done <- tcpConn{nil, err}
- return
- }
- newConn, err := net.DialTCP("tcp", nil, addr)
+ newConn, err := net.Dial("tcp", addr)
if err != nil {
done <- tcpConn{nil, err}
return
}
-
- done <- tcpConn{newConn, nil}
+ done <- tcpConn{newConn.(*net.TCPConn), nil}
}()
select {