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() {