From 948a7b84f3298d0455db5b2924acda640c8da3c7 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Tue, 21 Feb 2017 21:39:25 -0800 Subject: [PATCH] return promise --- lib/interrupt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/interrupt.js b/lib/interrupt.js index 4c910d3..50fd645 100644 --- a/lib/interrupt.js +++ b/lib/interrupt.js @@ -85,11 +85,11 @@ class Interrupt extends EventEmitter { } start() { - this.clear().then(() => this.poller.add(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT)); + return this.clear().then(() => this.poller.add(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT)); } reset() { - this.clear().then(() => this.poller.modify(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT)); + return this.clear().then(() => this.poller.modify(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT)); } stop() {