some minor fixes, removal of unused code, etc.
This commit is contained in:
parent
717f1d1fc6
commit
9e7b04d4b1
4 changed files with 13 additions and 11 deletions
|
@ -54,7 +54,7 @@ class StreamBuffer extends EventEmitter {
|
|||
announced: false
|
||||
};
|
||||
this.limit = {
|
||||
value: config?.buffer?.limit,
|
||||
value: config?.buffer?.limit * 1048576,
|
||||
announced: false
|
||||
};
|
||||
if (isNaN(this.limit.value) || this.limit.value < this.threshold.value) {
|
||||
|
|
|
@ -75,6 +75,10 @@ class Audiostream {
|
|||
logger.info('connection to audio server \'' + this.getTag() + '\' closed');
|
||||
});
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Audiostream;
|
|
@ -16,6 +16,8 @@ class Connection {
|
|||
}
|
||||
this.host = config?.server?.host || "127.0.0.1";
|
||||
this.port = config?.server?.port || "3000";
|
||||
this.eventParser = new EventParser();
|
||||
this.audiostream = new Audiostream(this.eventParser);
|
||||
}
|
||||
|
||||
getHost() {
|
||||
|
@ -51,8 +53,6 @@ class Connection {
|
|||
#handleEventConnect(resolve, socket) {
|
||||
logger.info('connected to communication server \'' + this.getTag() + '\'...');
|
||||
this.socket = socket;
|
||||
this.eventParser = new EventParser();
|
||||
this.audiostream = new Audiostream(this.eventParser);
|
||||
this.heartbeat = new Heartbeat(this.eventParser);
|
||||
this.#handleHeartbeat();
|
||||
socket.on('timeout', () => {
|
||||
|
@ -91,11 +91,6 @@ class Connection {
|
|||
});
|
||||
}
|
||||
|
||||
#handleAudioEvents() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
destroy() {
|
||||
if (this.heartbeat !== undefined) {
|
||||
this.heartbeat.destroy();
|
||||
|
@ -112,6 +107,10 @@ class Connection {
|
|||
this.socket.destroy();
|
||||
this.socket = undefined;
|
||||
}
|
||||
if (this.audiostream !== undefined) {
|
||||
this.audiostream.destroy();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
"delay": 1000
|
||||
},
|
||||
"buffer": {
|
||||
"limit": 40960
|
||||
},
|
||||
"tmp": "/tmp/kannon.tmp"
|
||||
"limit": 64
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue