On Fri, 2004-06-18 at 10:01, Paul J Stevens wrote: > That helped. Ethereal kicks ass :-) > > What happens in your case: > > Your clients sends a FETCH BODY.PEEK[..] command which requires dbmail > to retrieve and parse a *lot* of messages. While dbmail is happily > sending back the results, thunderbird sends a logout command which is > ignored by dbmail since it's busy. Dbmail keeps sending back results > where thunderbird is trying to close the socket, which in turn triggers > thunderbird into sending RST packets, destroying the socket. > > Ilja: the return value from ci_write can in many cases be ignored but > probably be respected in most cases. Perhaps the ci_write wrapper should > be replaced by a macro like > > #define CI_WRITE(fd, template, ...) \ > if ((int result = ci_write(fd, templace, ...)) > return result;
That might be a good idea. The only problem is that we wouldn't always want to exit from a function without cleaning up some memory, in which case this macro would make us leak memory. I guess, we'd better insert these checks manually. Ilja