Code

main: changed "connected" check to assertion
authorMax Kellermann <max@duempel.org>
Tue, 29 Sep 2009 16:20:25 +0000 (18:20 +0200)
committerMax Kellermann <max@duempel.org>
Tue, 29 Sep 2009 16:20:25 +0000 (18:20 +0200)
timer_reconnect() must not be called when ncmpc is already connected.

src/main.c

index 8d0d4b2f2ef6067d96cfc4db3388a4b8c028f586..058c84a21b54765e5eb6d01fdbdfef64396436da 100644 (file)
@@ -203,8 +203,7 @@ timer_reconnect(G_GNUC_UNUSED gpointer data)
 {
        int ret;
 
-       if (connected)
-               return FALSE;
+       assert(!connected);
 
        screen_status_printf(_("Connecting to %s...  [Press %s to abort]"),
                             options.host, get_key_names(CMD_QUIT,0) );