From cc53d5ebfa0e1b3149c44cd3507e3f57d1a06e06 Mon Sep 17 00:00:00 2001
From: naimo <naimo@users.noreply.github.com>
Date: Tue, 16 Apr 2019 18:19:11 +0200
Subject: [PATCH] fix unix socket not removed on shutdown (#50)

* fix unix socket not removed on shutdown

Signed-off-by: naimo <nicolas@aimon.fr>
---
 app.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app.js b/app.js
index 3de99e6ce..ceb225964 100644
--- a/app.js
+++ b/app.js
@@ -289,6 +289,9 @@ function handleTermSignals () {
       socket.disconnect(true)
     }, 0)
   })
+  if (config.path) {
+    fs.unlink(config.path)
+  }
   var checkCleanTimer = setInterval(function () {
     if (realtime.isReady()) {
       models.Revision.checkAllNotesRevision(function (err, notes) {