Reset sndiod initialization flag on disconnects
authorIngo Feinerer <feinerer@logic.at>
Mon, 15 Feb 2021 11:56:42 +0000 (12:56 +0100)
committerdrkhsh <me@drkhsh.at>
Wed, 26 Oct 2022 19:24:16 +0000 (21:24 +0200)
If the connection is lost to the sndiod(8) daemon reset the
initialization to allow for a graceful restart.

components/volume.c

index 32f781797f4a806081f59afc4859c24dd956afbe..c94f87246dc8bf14a316aeae7088680a5114b9eb 100644 (file)
                                if (sioctl_revents(hdl, pfds) & POLLHUP) {
                                        warn("sndio: disconnected");
                                        cleanup();
+                                       initialized = 0;
                                        return NULL;
                                }
                        }