Index: src/main/java/geniusweb/partiesserver/RunningPartiesUpdater.java
===================================================================
--- src/main/java/geniusweb/partiesserver/RunningPartiesUpdater.java	(revision 9)
+++ src/main/java/geniusweb/partiesserver/RunningPartiesUpdater.java	(revision 16)
@@ -12,7 +12,8 @@
  * 
  * This object keeps the {@link RunningPartiesRepo} up to date. Main job is to
- * remove parties that have been timed out. When a party times out,
- * it calls {@link Party#terminate()} but that might fail to stop a party. 
- * In the end, the protocol should close the connection after the deadline. Start and run only once.
+ * remove parties that have been timed out. When a party times out, it calls
+ * {@link Party#terminate()} but that might fail to stop a party. In the end,
+ * the protocol should close the connection after the deadline. Start and run
+ * only once.
  */
 public class RunningPartiesUpdater implements Runnable {
@@ -23,6 +24,6 @@
 	 * when a negotiation runs out of time, the protocol may want to inform all
 	 * parties about the failed session. If the parties are all killed at that
-	 * moment, this is impossible. Therefore we wait KILL_DELAY extra time before
-	 * really killing the parties.
+	 * moment, this is impossible. Therefore we wait KILL_DELAY extra time
+	 * before really killing the parties.
 	 */
 	private static final long KILL_DELAY = 2000;
@@ -31,7 +32,7 @@
 	 * @param repo   the {@link RunningPartiesRepo} that must be updated
 	 *               automatically
-	 * @param period the period with which to check time-out (ms). Recommended 1000.
-	 *               After constructing you can run this in separate thread or just
-	 *               call {@link #run()}
+	 * @param period the period with which to check time-out (ms). Recommended
+	 *               1000. After constructing you can run this in separate
+	 *               thread or just call {@link #run()}
 	 * 
 	 */
@@ -53,12 +54,14 @@
 			}
 		} catch (InterruptedException e) {
-			System.err.println("ERROR:  RunningPartiesUpdater was interrupted!");
+			System.err
+					.println("ERROR:  RunningPartiesUpdater was interrupted!");
 		}
 	}
 
 	/**
-	 * Called when some file that may be relevant has changed. Synchronized to avoid
-	 * weird states if filesystem changes rapidly. We ignore everything but jar
-	 * files.
+	 * Removes parties when they ran out of time. Called when some file that may
+	 * be relevant has changed, and periodically every {@link #period}.
+	 * Synchronized to avoid weird states if filesystem changes rapidly. We
+	 * ignore everything but jar files.
 	 */
 	void update() {
@@ -66,6 +69,13 @@
 			long now = System.currentTimeMillis();
 			if (now >= party.getEndDate().getTime() + KILL_DELAY) {
+				log.log(Level.WARNING,
+						"party " + party.getID() + " still running "
+								+ KILL_DELAY / 1000
+								+ "s after deadline. Removed now.");
 				running.remove(party.getID());
-				log.log(Level.WARNING, "party " + party.getID() + " still running 2s after deadline. Removed now.");
+				try {
+					Thread.sleep(20);
+				} catch (InterruptedException e) {
+				}
 			}
 		}
Index: src/main/java/geniusweb/partiesserver/websocket/ActiveThreads.java
===================================================================
--- src/main/java/geniusweb/partiesserver/websocket/ActiveThreads.java	(revision 16)
+++ src/main/java/geniusweb/partiesserver/websocket/ActiveThreads.java	(revision 16)
@@ -0,0 +1,67 @@
+package geniusweb.partiesserver.websocket;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.logging.Level;
+
+import tudelft.utilities.logging.Reporter;
+
+/**
+ * Keeps track of threads active for a PartySocket. Needed so that we can kill
+ * all relevant threads when it comes to forced termination.
+ */
+public class ActiveThreads {
+	private final List<Thread> threads = new LinkedList<>();
+	private final Reporter log;
+
+	public ActiveThreads(Reporter log) {
+		this.log = log;
+	}
+
+	/**
+	 * Add the current thread as active thread
+	 */
+	public synchronized void add() {
+		threads.add(Thread.currentThread());
+	}
+
+	/**
+	 * Remove the current thread as active thread. To be called when thread
+	 * finished nicely.
+	 */
+	public synchronized void remove() {
+		threads.remove(Thread.currentThread());
+
+	}
+
+	/**
+	 * 
+	 * @return true if no threads currently running.
+	 */
+	public synchronized boolean isEmpty() {
+		return threads.isEmpty();
+	}
+
+	@SuppressWarnings("deprecation")
+	public synchronized void killall() {
+
+		/*
+		 * The method stop(Throwable) does not work anymore. we need to call
+		 * stop() which will result in nonsense stacktrace pointing to US
+		 * instead of the real problem. Only solution is to print stacktrace
+		 * ourselves.
+		 */
+		for (Thread thread : threads) {
+			String stacktrace = "";
+			for (StackTraceElement element : thread.getStackTrace()) {
+				stacktrace += "\t" + element.toString() + "\n";
+			}
+
+			log.log(Level.INFO,
+					"Killing thread with stack trace\n" + stacktrace);
+			/* the most powerful kill, deprecated but required here. */
+			thread.stop();
+		}
+		threads.clear();
+	}
+}
Index: src/main/java/geniusweb/partiesserver/websocket/PartySocket.java
===================================================================
--- src/main/java/geniusweb/partiesserver/websocket/PartySocket.java	(revision 9)
+++ src/main/java/geniusweb/partiesserver/websocket/PartySocket.java	(revision 16)
@@ -44,8 +44,10 @@
 public class PartySocket implements ConnectionEnd<Inform, Action> {
 	private final static ObjectMapper jackson = new ObjectMapper();
+	private static final int MAX_MESSAGE_SIZE = 20 * 1024 * 1024;
+
 	private final Reporter log;
 	private final RunningPartiesRepo runningparties;
 	private final List<Listener<Inform>> listeners = new CopyOnWriteArrayList<Listener<Inform>>();
-	private static final int MAX_MESSAGE_SIZE = 20 * 1024 * 1024;
+	private final ActiveThreads threads;
 
 	// should all be final, except that we can only set them when start is
@@ -66,4 +68,5 @@
 		this.runningparties = parties;
 		this.log = reporter;
+		this.threads = new ActiveThreads(log);
 	}
 
@@ -128,4 +131,8 @@
 			throw new IllegalStateException("Unexpected change of session ID");
 		}
+		if (!threads.isEmpty()) {
+			log.log(Level.WARNING, "Party " + partyID
+					+ " is still busy with previous message");
+		}
 		Inform info = jackson.readValue(informmessage, Inform.class);
 		RunningParty party = runningparties.get(partyID);
@@ -135,14 +142,27 @@
 			log.log(Level.FINE, "Inform " + partyID + ": " + info);
 			try {
+				threads.add();
 				party.inform(info);
+				threads.remove();
 			} catch (Throwable e) {
-				log.log(Level.WARNING, "Party failed on inform.", e);
-				e.printStackTrace();
-				// severe as someone wants to debug that. Not severe for us
-				// we don't use jackson.writeValueAsString(e) here because
-				// CloseReason has 123 char limit.
-				// The error will be too large to fit and will be truncated
-				// therefore we send a plain string and hope that enough
-				// will arrive at the other side (the protocol)
+				threads.remove();
+				if (e instanceof ThreadDeath)
+					/*
+					 * ThreadDeath always prints stacktrace anwyay, stacktrace
+					 * is useless because it contains the thrower's stacktrace
+					 * instead of a useful message.
+					 */
+					log.log(Level.WARNING,
+							"Party was killed while handling inform.");
+				else
+					log.log(Level.WARNING, "Party failed on inform.", e);
+				/*
+				 * severe as someone wants to debug that. Not severe for us we
+				 * don't use jackson.writeValueAsString(e) here because
+				 * CloseReason has 123 char limit. The error will be too large
+				 * to fit and will be truncated therefore we send a plain string
+				 * and hope that enough will arrive at the other side (the
+				 * protocol)
+				 */
 				session.close(new CloseReason(
 						CloseReason.CloseCodes.CLOSED_ABNORMALLY,
@@ -186,8 +206,9 @@
 	public void onClose() throws IOException {
 		log.log(Level.INFO, "socket closed to " + partyID);
-		/*
-		 * for now just kill the party. Maybe we can do something with reconnect
-		 * but that will be complex.
-		 */
+		if (!threads.isEmpty()) {
+			log.log(Level.WARNING, "Party " + partyID
+					+ " failed to terminate. Trying to kill the remaining threads.");
+			threads.killall();
+		}
 		runningparties.remove(partyID);
 		outstream.stop();
