From 5fd94278cf64cd3f1bd91c2e755b6928eeccf9d3 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 25 Mar 2019 14:18:01 +0000 Subject: [PATCH] fix: code review feedback --- src/daemon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon.js b/src/daemon.js index 56d70b9..9374402 100644 --- a/src/daemon.js +++ b/src/daemon.js @@ -122,12 +122,12 @@ class Daemon { */ _cleanUnixSocket () { return new Promise((resolve, reject) => { - const path = this._addr.toString().split('/unix') + const path = this._addr.getPath() if (!path) { return resolve() } - rimraf(path[1], (err) => { + rimraf(path, (err) => { if (err) { return reject(err) }