mirror of
https://git.coolaj86.com/coolaj86/telebit.js.git
synced 2025-04-21 19:40:37 +00:00
null buffers
This commit is contained in:
parent
11546b298a
commit
442283f42c
@ -89,7 +89,7 @@ return;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function endWithError() {
|
function endWithError() {
|
||||||
wstunneler.send(pack(opts, Buffer.from('|__ERROR__|'), 'error'), { binary: true });
|
wstunneler.send(pack(opts, null, 'error'), { binary: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localclients[cid]) {
|
if (localclients[cid]) {
|
||||||
@ -113,7 +113,7 @@ return;
|
|||||||
if (!servername) {
|
if (!servername) {
|
||||||
console.warn("|__ERROR__| no servername found for '" + cid + "'");
|
console.warn("|__ERROR__| no servername found for '" + cid + "'");
|
||||||
console.warn(opts.data.toString());
|
console.warn(opts.data.toString());
|
||||||
wstunneler.send(pack(opts, Buffer.from('|__ERROR__|'), 'error'), { binary: true });
|
wstunneler.send(pack(opts, null, 'error'), { binary: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,12 +132,12 @@ return;
|
|||||||
console.error("[error] local '" + opts.service + "' '" + cid + "'");
|
console.error("[error] local '" + opts.service + "' '" + cid + "'");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
delete localclients[cid];
|
delete localclients[cid];
|
||||||
wstunneler.send(pack(opts, Buffer.from('|__ERROR__|'), 'error'), { binary: true });
|
wstunneler.send(pack(opts, null, 'error'), { binary: true });
|
||||||
});
|
});
|
||||||
lclient.on('end', function () {
|
lclient.on('end', function () {
|
||||||
console.log("[end] local '" + opts.service + "' '" + cid + "'");
|
console.log("[end] local '" + opts.service + "' '" + cid + "'");
|
||||||
delete localclients[cid];
|
delete localclients[cid];
|
||||||
wstunneler.send(pack(opts, Buffer.from('|__END__|'), 'end'), { binary: true });
|
wstunneler.send(pack(opts, null, 'end'), { binary: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
, onend: function (opts) {
|
, onend: function (opts) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user