mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Fix Node event chaining in VirtualConnectionServer to work with latest NPM libraries. Fixes #331.
This commit is contained in:
@@ -105,11 +105,12 @@ class VirtualConnectionsCollection {
|
||||
}
|
||||
};
|
||||
|
||||
const newVirtualConnection = new VirtualConnection(beginWriteCallback)
|
||||
.on('end', () => {
|
||||
const newVirtualConnection = new VirtualConnection(beginWriteCallback);
|
||||
newVirtualConnection.on('end', () => {
|
||||
// The virtual connection was closed remotely. Clean up locally.
|
||||
this._onVirtualConnectionWasClosed(header.connectionIdString);
|
||||
}).on('finish', () => {
|
||||
});
|
||||
newVirtualConnection.on('finish', () => {
|
||||
// The virtual connection was closed locally. Clean up locally, and notify the remote that we're done.
|
||||
this._onVirtualConnectionWasClosed(header.connectionIdString);
|
||||
this._sendFrame(header.connectionIdBinary, new Buffer(0));
|
||||
|
||||
Reference in New Issue
Block a user