Skip to content
Browse files

Stop when the daemon disconnects without a quit-signal.

  • Loading branch information...
1 parent be1d71e commit 3522e44bf0fde30554f714cefa40dcd97ecd8a9e @nesciens nesciens committed with Tilman Sauerbeck
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/xmms2-scrobbler.c
View
8 src/xmms2-scrobbler.c
@@ -490,6 +490,12 @@ on_quit (xmmsc_result_t *res, void *udata)
}
static void
+on_disconnect (void *udata)
+{
+ keep_running = false;
+}
+
+static void
for_each_line (FILE *fp,
void (*callback) (const char *line, void *user_data),
void *user_data)
@@ -715,6 +721,8 @@ main (int argc, char **argv)
xmmsc_result_notifier_set (quit_broadcast, on_quit, NULL);
xmmsc_result_unref (quit_broadcast);
+ xmmsc_disconnect_callback_set (conn, on_disconnect, NULL);
+
main_loop ();
/* tell the curl thread to stop working */

0 comments on commit 3522e44

Please sign in to comment.
Something went wrong with that request. Please try again.