2014-11-30 19:54 GMT+01:00 Max Kellermann <[email protected]>:
> On 2014/11/30 19:52, Piotr Koz??owski <[email protected]> wrote:
> > Hi,
> >
> > I've written a patch that allows configurable number of attempts to connect
> > to remote MPD server if there are any errors.
> >
> > I'm running MPD proxy on a headless single board computer. It often happens
> > that the first connection attempt fails, usually because of the delays in
> > configuring the (wifi) network interface, but the following attempts
> > succeed. This patch saves me a lot of time: I do not have to ssh to the
> > board and do "service mpd start", so I think it may be useful to others,
> > too.
>
> Use of sleep() is unacceptable.

Could you explain why? I've seen usage of usleep() in other parts of
the code - would it be better here? Otherwise what do you suggest? I'm
new to MPD development, so any advice is welcome.

> But why do you have to start MPD?

Normally MPD is started through System-V init scripts, but if the
startup fails (due to connection problems), it will not be restarted.
That's why I have to ssh and start MPD manually.

> And why does your wifi network fail to transmit the first packet? I don't 
> think I'll merge this patch, even with sleep() removed.

I'm not sure about that - when I try to ping the other host after boot
up, the first packet is lost, the second one arrives with an huge
delay (1-2 seconds), and than following are transmitted correctly (few
ms delay). But I don't think this is the right place to discuss issues
of my home network.

Thanks,
Piotr
_______________________________________________
mpd-devel mailing list
[email protected]
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to