Comparing version 7.0.3 to 7.0.4
{ | ||
"name": "bpmux", | ||
"description": "Node stream multiplexing with back-pressure on each stream", | ||
"version": "7.0.3", | ||
"version": "7.0.4", | ||
"homepage": "https://github.com/davedoesdev/bpmux", | ||
@@ -59,3 +59,3 @@ "author": { | ||
"grunt-shell": "^2.1.0", | ||
"http2-duplex": "^1.0.0", | ||
"http2-duplex": "^2.0.0", | ||
"mocha": "^5.2.0", | ||
@@ -62,0 +62,0 @@ "nw-builder": "^3.5.4", |
@@ -107,5 +107,17 @@ /*eslint-env node */ | ||
}, | ||
async function (http2_duplex_server, cb) | ||
function (http2_duplex_server, cb) | ||
{ | ||
await http2_duplex_server.close(); | ||
http2_duplex_server.detach(); | ||
http2_duplex_server.http2_server.on('session', function (session) | ||
{ | ||
try | ||
{ | ||
session.destroy(); | ||
} | ||
catch (ex) | ||
{ // eslint-disable-line no-empty | ||
} | ||
}); | ||
http2_duplex_server.http2_server.close(cb); | ||
@@ -112,0 +124,0 @@ }, |
@@ -47,4 +47,7 @@ /*eslint-env node */ | ||
{ | ||
server.removeAllListeners('session'); | ||
for (let session of server.bpmux_sessions) | ||
{ | ||
session.removeAllListeners('stream'); | ||
try | ||
@@ -59,2 +62,13 @@ { | ||
server.on('session', function (session) | ||
{ | ||
try | ||
{ | ||
session.destroy(); | ||
} | ||
catch (ex) | ||
{ // eslint-disable-line no-empty | ||
} | ||
}); | ||
server.close(cb); | ||
@@ -61,0 +75,0 @@ }, |
496455
4767