Skip to content

Commit 5fcc7d4

Browse files
authored
imapclient: use dialer in DialInsecure
The default `net` package dialer doesn't have timeout. The dialer defined and used in client connection does.
1 parent b4bb320 commit 5fcc7d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imapclient/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func NewStartTLS(conn net.Conn, options *Options) (*Client, error) {
212212

213213
// DialInsecure connects to an IMAP server without any encryption at all.
214214
func DialInsecure(address string, options *Options) (*Client, error) {
215-
conn, err := net.Dial("tcp", address)
215+
conn, err := dialer.Dial("tcp", address)
216216
if err != nil {
217217
return nil, err
218218
}

0 commit comments

Comments
 (0)