mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-29 14:06:09 +02:00
Don't idle logout if a transfer is making progress
This commit is contained in:
parent
59ee52ea6f
commit
387dfb3b5d
2 changed files with 19 additions and 4 deletions
|
@ -378,7 +378,16 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
|||
|
||||
const externalProc = pty.spawn(cmd, args, spawnOpts);
|
||||
|
||||
let dataHits = 0;
|
||||
const updateActivity = () => {
|
||||
if (0 === (dataHits++ % 4)) {
|
||||
this.client.explicitActivityTimeUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
this.client.setTemporaryDirectDataHandler(data => {
|
||||
updateActivity();
|
||||
|
||||
// needed for things like sz/rz
|
||||
if(external.escapeTelnet) {
|
||||
const tmp = data.toString('binary').replace(/\xff{2}/g, '\xff'); // de-escape
|
||||
|
@ -389,6 +398,8 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
|||
});
|
||||
|
||||
externalProc.on('data', data => {
|
||||
updateActivity();
|
||||
|
||||
// needed for things like sz/rz
|
||||
if(external.escapeTelnet) {
|
||||
const tmp = data.toString('binary').replace(/\xff/g, '\xff\xff'); // escape
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue