diff --git a/bin/ugrid.js b/bin/ugrid.js
index <HASH>..<HASH> 100755
--- a/bin/ugrid.js
+++ b/bin/ugrid.js
@@ -177,6 +177,7 @@ function handleClose(sock) {
 		pubmon({event: 'disconnect', uuid: cli.uuid});
 		cli.sock = null;
 	}
+    releaseWorkers(cli.uuid);
 	if (sock.index) delete crossbar[sock.index];
 	for (var i in cli.topics) {		// remove owned topics
 		delete topicIndex[topics[i].name];
@@ -227,6 +228,14 @@ function register(from, msg, sock)
 	msg.data = {uuid: uuid, token: 0, id: sock.index};
 }
 
+function releaseWorkers(master) {
+	for (var i in clients) {
+		var d = clients[i].data;
+		if (d && d.jobId == master)
+			d.jobId = "";
+	}
+}
+
 function devices(query) {
 	var result = [];
 	for (var i in clients) {
ugrid.js releases workers at master disconnect


Former-commit-id: d<I>d<I>cb8affe<I>bd<I>cdac<I>fd7a<I>