---
 src/pulse/mainloop.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 8ac8f06..fe2966d 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -774,7 +774,10 @@ void pa_mainloop_wakeup(pa_mainloop *m) {
     char c = 'W';
     pa_assert(m);
 
-    pa_write(m->wakeup_pipe[1], &c, sizeof(c), &m->wakeup_pipe_type);
+    if (pa_write(m->wakeup_pipe[1], &c, sizeof(c), &m->wakeup_pipe_type) < 0)
+        /* Not much options for recovering from the error. Let's at least log 
something. */
+        pa_log("pa_write() failed while trying to wake up the mainloop: %s", 
pa_cstrerror(errno));
+
     pa_atomic_store(&m->wakeup_requested, TRUE);
 }
 
-- 
1.7.8

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to