Skip to content

Commit c8166b5

Browse files
author
Alan Fleming
committed
Fix 'Control comm was closed' being emitted when comm closing properly.
1 parent b12dae7 commit c8166b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/base-manager/src/manager-base.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,10 @@ export abstract class ManagerBase implements IWidgetManager {
413413
resolve(null);
414414
});
415415

416-
initComm.on_close(() => reject('Control comm was closed too early'));
416+
initComm.on_close(() => {
417+
if (data.method !== 'update_states')
418+
reject('Control comm was closed too early');
419+
});
417420

418421
// Send a states request msg
419422
initComm.send({ method: 'request_states' }, {});

0 commit comments

Comments
 (0)