|
|
|
@ -251,7 +251,7 @@ vAPI.messaging.onPortMessage = function(request, port) {
|
|
|
|
|
if ( request.requestId !== undefined ) {
|
|
|
|
|
callback = function(response) {
|
|
|
|
|
// https://github.com/gorhill/uBlock/issues/383
|
|
|
|
|
if ( port.disconnected === true ) {
|
|
|
|
|
if ( vAPI.messaging.ports.hasOwnProperty(port.name) === false ) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
port.postMessage({
|
|
|
|
@ -292,8 +292,6 @@ vAPI.messaging.onPortDisconnect = function(port) {
|
|
|
|
|
port.onDisconnect.removeListener(vAPI.messaging.onPortDisconnect);
|
|
|
|
|
port.onMessage.removeListener(vAPI.messaging.onPortMessage);
|
|
|
|
|
delete vAPI.messaging.ports[port.name];
|
|
|
|
|
// https://github.com/gorhill/uBlock/issues/383
|
|
|
|
|
port.disconnected = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|