diff -ur cockpit-0.27/src/ws/cockpitwebservice.c cockpit-0.27-notimeout/src/ws/cockpitwebservice.c --- cockpit-0.27/src/ws/cockpitwebservice.c 2014-10-10 13:39:03.000000000 +0200 +++ cockpit-0.27-notimeout/src/ws/cockpitwebservice.c 2015-03-25 11:45:07.772068925 +0100 @@ -166,7 +166,7 @@ g_hash_table_remove (sessions->by_channel, channel); g_hash_table_remove (session->channels, channel); - if (g_hash_table_size (session->channels) == 0) + if (g_hash_table_size (session->channels) == 0 && !session->primary) { /* * Close sessions that are no longer in use after N seconds