mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-08 05:34:41 +02:00
Fix a couple rare bugs around SSH sessions
This commit is contained in:
parent
4aab8224ed
commit
2f09f3e995
2 changed files with 13 additions and 6 deletions
|
@ -184,7 +184,7 @@ function SSHClient(clientConn) {
|
|||
if(self.input) { // do we have I/O?
|
||||
self.updateTermInfo(info);
|
||||
} else {
|
||||
self.cachedPtyInfo = info;
|
||||
self.cachedTermInfo = info;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -197,9 +197,9 @@ function SSHClient(clientConn) {
|
|||
|
||||
channel.stdin.on('data', self.dataHandler);
|
||||
|
||||
if(self.cachedPtyInfo) {
|
||||
self.updateTermInfo(self.cachedPtyInfo);
|
||||
delete self.cachedPtyInfo;
|
||||
if(self.cachedTermInfo) {
|
||||
self.updateTermInfo(self.cachedTermInfo);
|
||||
delete self.cachedTermInfo;
|
||||
}
|
||||
|
||||
// we're ready!
|
||||
|
@ -210,7 +210,11 @@ function SSHClient(clientConn) {
|
|||
session.on('window-change', (accept, reject, info) => {
|
||||
self.log.debug(info, 'SSH window-change event');
|
||||
|
||||
self.updateTermInfo(info);
|
||||
if(self.input) {
|
||||
self.updateTermInfo(info);
|
||||
} else {
|
||||
self.cachedTermInfo = info;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue