diff --git a/lib/interrupt.js b/lib/interrupt.js index 50fd645..aa6f82e 100644 --- a/lib/interrupt.js +++ b/lib/interrupt.js @@ -53,6 +53,7 @@ class Interrupt extends EventEmitter { } + // manual firing for testing fire(name = 'fired') { this.emit(name, this.hook) } @@ -85,6 +86,11 @@ class Interrupt extends EventEmitter { } start() { + this.inter(port).on('fired', () => { + console.log(`interrupt port ${port} hook me \n ${relays}`) + // hook.bind(this)(port) + + }) return this.clear().then(() => this.poller.add(this.valuefd, Epoll.EPOLLPRI | Epoll.EPOLLONESHOT)); }