We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89cb1f7 commit 515339bCopy full SHA for 515339b
1 file changed
src/app/service/content/gm_api/gm_api.ts
@@ -1409,7 +1409,11 @@ export default class GMApi extends GM_Base {
1409
error = null; // GC
1410
};
1411
const onStart = async (con: MessageConnect) => {
1412
- if (killConn === null || done) return;
+ if (killConn === null || done) {
1413
+ // already resolved
1414
+ con.disconnect();
1415
+ return;
1416
+ }
1417
try {
1418
result = await cb();
1419
} catch (e) {
@@ -1424,7 +1428,7 @@ export default class GMApi extends GM_Base {
1424
1428
onDisconnected(); // in case .disconnect() not working
1425
1429
1426
1430
this.connect("runExclusive", [key]).then((con) => {
1427
- if (killConn === null) {
1431
1432
// already resolved
1433
con.disconnect();
1434
return;
0 commit comments