symmetryinvestments / imap-d

D library for IMAP (JMAP is a work-in-progress but the basics work)
14 stars 10 forks source link

Reading from the socket tends to block. #48

Open otrho opened 4 years ago

otrho commented 4 years ago

Much of the response reading/parsing code uses a default timeout of 20 seconds (from session.d: Options.timeout) but I'm seeing the code just blocking if we try to read when there's no data.

Right now e.g., in append() when reading a continue response but getting a TRYCREATE it doesn't parse properly and blocks. I'll fix that specifically but there are probably many places in the reading/parsing which could block in a similar way (even with a timeout, which is strange.)