Skip to content

Commit ee36cf4

Browse files
committed
imapclient: fix timeout for initial greeting
We were setting the timeout to 0 when waiting for the initial greeting from the server. Use 30s instead.
1 parent a3d3674 commit ee36cf4

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
@@ -575,7 +575,7 @@ func (c *Client) read() {
575575
c.closeWithError(cmdErr)
576576
}()
577577

578-
c.setReadTimeout(idleReadTimeout)
578+
c.setReadTimeout(respReadTimeout) // We're waiting for the greeting
579579
for {
580580
// Ignore net.ErrClosed here, because we also call conn.Close in c.Close
581581
if c.dec.EOF() || errors.Is(c.dec.Err(), net.ErrClosed) || errors.Is(c.dec.Err(), io.ErrClosedPipe) {

0 commit comments

Comments
 (0)