From 992e0b92eeb7ab4e7cb0ff84c8727ab2aa802b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucius=20Gait=C3=A1n?= Date: Sat, 21 Oct 2017 04:06:46 -0200 Subject: [PATCH] Unlink socket before listen --- src/lib/cli.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/cli.js b/src/lib/cli.js index 76503f09a..b25e23431 100644 --- a/src/lib/cli.js +++ b/src/lib/cli.js @@ -172,6 +172,10 @@ function afterConfigLoad() { webServer = http.createServer(app); } + if (addr.path) { + fs.unlinkSync(addr.path); + } + webServer .listen(addr.port || addr.path, addr.host) .on('error', function(err) {