aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/jarvis.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js
index 5103934..3572a3c 100644
--- a/examples/jarvis.js
+++ b/examples/jarvis.js
@@ -27,7 +27,11 @@ main.on('open', ()=>{ // Tries to identify itself with a cursor movement
identity(send);
}
}
-})
+});
+
+main.on('close', ()=>{
+ writes.disable()
+});
var sender; // Global variable that holds identity()'s `send` for tileHandler
@@ -39,6 +43,7 @@ function identity(send){
}
function init(){
+ writes.enable();
notifRefresh();
}