File tree 1 file changed +5
-3
lines changed
packages/protocol/src/browser
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -174,9 +174,10 @@ export class Client {
174
174
* Make a remote call for a proxy's method using proto.
175
175
*/
176
176
private remoteCall ( proxyId : number | Module , method : string , args : any [ ] ) : Promise < any > {
177
- if ( this . disconnected && typeof proxyId === "number" ) {
178
- // Can assume killing or closing works because a disconnected proxy
179
- // is disposed on the server's side.
177
+ if ( typeof proxyId === "number" && ( this . disconnected || ! this . proxies . has ( proxyId ) ) ) {
178
+ // Can assume killing or closing works because a disconnected proxy is
179
+ // disposed on the server's side, and a non-existent proxy has already
180
+ // been disposed.
180
181
switch ( method ) {
181
182
case "close" :
182
183
case "kill" :
@@ -469,6 +470,7 @@ export class Client {
469
470
promise,
470
471
instance,
471
472
callbacks : new Map ( ) ,
473
+ disposed : false ,
472
474
} ) ;
473
475
474
476
instance . onDone ( ( ) => {
You can’t perform that action at this time.
0 commit comments