[Musicpd-dev-team] [PATCH] Set socket TCP keepalive option on incoming connections

2011-09-19 Thread Dan McGee
If a connected host disappears without our knowledge, as can happen over wireless or a hibernating machine, we continue to hold the port open waiting for messages. Because we never try to send anything down this now-broken pipe, the connection will sit idle taking up a slot in our allowed incoming

Re: [Musicpd-dev-team] [PATCH] Set socket TCP keepalive option on incoming connections

2011-09-19 Thread Jonathan Neuschäfer
Just some minor nitpicks here, I'm not an MPD core developer. On Mon, Sep 19, 2011 at 08:10:13AM -0500, Dan McGee wrote: + if (fd = 0) { + if (socket_keepalive(fd)) + g_warning(Could not set TCP keepalive option: %s, +

Re: [Musicpd-dev-team] [PATCH] Set socket TCP keepalive option on incoming connections

2011-09-19 Thread Max Kellermann
On 2011/09/19 15:10, Dan McGee d...@archlinux.org wrote: If a connected host disappears without our knowledge, as can happen over wireless or a hibernating machine, we continue to hold the port open waiting for messages. Because we never try to send anything down this now-broken pipe, the

Re: [Musicpd-dev-team] [PATCH] Set socket TCP keepalive option on incoming connections

2011-09-19 Thread Jonathan Neuschäfer
On Mon, Sep 19, 2011 at 10:20:54AM -0500, Dan McGee wrote: On Mon, Sep 19, 2011 at 10:13 AM, Jonathan Neuschäfer j.neuschae...@gmx.net wrote: Just some minor nitpicks here, I'm not an MPD core developer. On Mon, Sep 19, 2011 at 08:10:13AM -0500, Dan McGee wrote: +     if (fd = 0) { +