--- include/engine.h.orig	2012-04-02 17:58:19.000000000 +0200
+++ include/engine.h	2013-06-12 15:58:05.000000000 +0200
@@ -56,7 +56,7 @@
     char name[JACK_CLIENT_NAME_SIZE];
 } jack_reserved_name_t;
 
-#define JACKD_WATCHDOG_TIMEOUT 10000
+#define JACKD_WATCHDOG_TIMEOUT 120000
 #define JACKD_CLIENT_EVENT_TIMEOUT 2000
 
 /* The main engine structure in local memory. */
@@ -209,9 +209,9 @@
 extern jack_client_internal_t *
 jack_client_internal_by_id (jack_engine_t *engine, jack_client_id_t id);
 
-#define jack_rdlock_graph(e) { DEBUG ("acquiring graph read lock"); if (pthread_rwlock_rdlock (&e->client_lock)) abort(); }
-#define jack_lock_graph(e) { DEBUG ("acquiring graph write lock"); if (pthread_rwlock_wrlock (&e->client_lock)) abort(); }
-#define jack_try_rdlock_graph(e) pthread_rwlock_tryrdlock (&e->client_lock)
+#define jack_rdlock_graph(e) { DEBUG ("acquiring graph read lock"); e->watchdog_check = 1; if (pthread_rwlock_rdlock (&e->client_lock)) abort(); }
+#define jack_lock_graph(e) { DEBUG ("acquiring graph write lock"); e->watchdog_check = 1; if (pthread_rwlock_wrlock (&e->client_lock)) abort(); }
+#define jack_try_rdlock_graph(e) ((e->watchdog_check = 1), pthread_rwlock_tryrdlock (&e->client_lock))
 #define jack_unlock_graph(e) { DEBUG ("release graph lock"); if (pthread_rwlock_unlock (&e->client_lock)) abort(); }
 
 #define jack_trylock_problems(e) pthread_mutex_trylock (&e->problem_lock)
--- jackd/engine.c.orig	2013-06-12 15:59:32.000000000 +0200
+++ jackd/engine.c	2013-06-12 15:59:33.000000000 +0200
@@ -2310,6 +2310,7 @@
 	   to exit.
 	*/
 
+	engine->watchdog_check = 1;
 	engine->stop_freewheeling = 1;
 
 	VERBOSE (engine, "freewheeling stopped, waiting for thread");
