Open Simerax opened 2 months ago
We encountered this issue several times and prepared a fix proposal #615. The implementation honors the timeout value in the dialer, but during the construction of a new client, there are 2 consequent requests. The first one runs with a deadline value and times out correctly. However, at the beginning of each command, the connection deadline is set to zero if there is no timeout value defined on the client. At this point, the client object is not returned to the user yet and timeout is always zero.
Go-Imap 1.2.1 seems to hang forever in some cases even though we set a
Timeout
(andDeadline
) innet.Dialer
.The IMAP-Server we are connecting to (
imap.office365.com
) seems to just let us "hang" sometimes (I don't know why - it happens randomly).This would not really be a problem if the client could just hang up on its own after a certain timeout. The settings in
net.Dialer
don't seem to do anything.Does the IMAP Library not honor the
Timeout
/Deadline
Setting innet.Dialer
here or are we doing something wrong?We are unable to give you anymore debugging because we cannot call
.SetDebug(w)
since this problem occurs withinDialWithDialerTLS
before we even have a handle to the client.Ps. we are cross compiling from windows/amd64 to linux/amd64 thats probably why the stack trace paths begin with
C:\...
but the functions are unix/linux like (poll/fd_unix.go
)