[RFC PATCH v2] imapd.c: imapoptions: implement idle timeout

ellie timoney ellie at fastmail.com
Tue Sep 27 02:19:54 EDT 2016


On Thu, Sep 22, 2016, at 05:55 AM, Carson Gaspar via Cyrus-devel wrote:
> > If the client's connection has dropped out, no data will ever appear on
> > the socket, so select will never flag it as readable, so we will never
> > try to read from it, so we will never receive the read error even though
> > tcp_keepalive detected the dropout.  And if this client was idling with
> >
> Not true on any flavour of UNIX of which I'm aware. select() marks a fd 
> as readable on EOF. poll() marks the fd as either POLLIN, POLLHUP, or 
> both (sadly implementation specific).

Yeah wow, interesting.  Something I was reading last week was utterly
certain that keepalive's effect would -only- be noticed on read/write
attempts (not on select).  But documentation confirms that select is at
least -supposed- to notice this, and if select notices it, then imapd
will see it and terminate the connection.  Cool.

Thanks for clearing that up :)


More information about the Cyrus-devel mailing list