sc2mpd: fix shutting down the command socket

Handle the socket the same way it is done in mpd2sc. It turned out that
when restarting mpd2sc and sc2mpd, an external process communicating
with both processes could not communicate anymore with sc2mpd, but
mpd2sc. The system error message was "Connection refused".

To handle this issue use the shutdown() system call in the signal
handler to propery shutdown the receive operation. After a restart of
sc2mpd any external process will be able to communicate to sc2mpd
without being restarting the external process itself.

Jörg Krause Jörg Krause 2017-11-29

changed sc2src/sc2mpd.cpp
sc2src/sc2mpd.cpp Diff Switch to unified view
Loading...