Henrique de Moraes Holschuh wrote: >On Thu, 16 May 2002, Jeremy Howard wrote: > > >>I *strongly* recommend also including shutdown.diff. This is important >>in Linux to avoid sockets handing around in CLOSE_WAIT state. Remove the >>' && !imapd_in->tls_conn' bit everywhere for general distribution--this >>is a workaround for a memory corruption problem that is unrelated to >>this patch. >> >> > >I see. What about all those commented lines in your original >master-avail.diff patch? Were they past shutdown() experiments? > > That's correct, Henrique. The commented lines should not be included in a widely distributed version. I left them in, but commented out, in order to remind myself what experiments we had done. Only the lines that are *not* commented out should be included.
I believe (?) that this issue is less important on Solaris, because I think that it handles close() differently to Linux. However on Linux it is vital to flush receive buffers and call shutdown() to avoid hanging connections.