mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-08 13:44:39 +02:00
* Fix file transfer bug for WebSockets and SSH. Set/restore temp data handler belongs in base client.
* Lint some files
This commit is contained in:
parent
b2ae81c59e
commit
388e581b90
4 changed files with 57 additions and 53 deletions
|
@ -30,6 +30,10 @@ function WebSocketClient(ws, req, serverType) {
|
|||
|
||||
const self = this;
|
||||
|
||||
this.dataHandler = function(data) {
|
||||
self.socketBridge.emit('data', data);
|
||||
};
|
||||
|
||||
//
|
||||
// This bridge makes accessible various calls that client sub classes
|
||||
// want to access on I/O socket
|
||||
|
@ -65,9 +69,7 @@ function WebSocketClient(ws, req, serverType) {
|
|||
}
|
||||
}(ws);
|
||||
|
||||
ws.on('message', data => {
|
||||
this.socketBridge.emit('data', data);
|
||||
});
|
||||
ws.on('message', this.dataHandler);
|
||||
|
||||
ws.on('close', () => {
|
||||
// we'll remove client connection which will in turn end() via our SocketBridge above
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue