1 | ;
|
2 |
|
3 | const { PassThrough } = require('stream');
|
4 |
|
5 | const { kellnerApp } = require('../symbols');
|
6 |
|
7 | module.exports = class KellnerPassThrough extends PassThrough {
|
8 | constructor(app) {
|
9 | super({ objectMode: true });
|
10 | this[kellnerApp] = app;
|
11 | this.on('error', e => this[kellnerApp].fail(e));
|
12 | this.on('disconnect', e => this[kellnerApp].fail(e));
|
13 | }
|
14 | };
|