@bivy/bivy 0.16.9-staging.19 → 0.16.9-staging.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +14 -2
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -2144,9 +2144,21 @@ const RELAY_COMMANDS = {
|
|
|
2144
2144
|
scheduleAdvertise();
|
|
2145
2145
|
},
|
|
2146
2146
|
abort(msg, ctx) {
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2147
|
+
const sessionId = String(msg.sessionId ?? "");
|
|
2148
|
+
const record = resolveSession(sessionId);
|
|
2149
|
+
// A Stop can race the turn settling (or arrive after another client already
|
|
2150
|
+
// stopped it). Always answer that race with authoritative state so a client
|
|
2151
|
+
// that still has a stale working dot does not leave the stopped session
|
|
2152
|
+
// looking active until the next minute-long list refresh.
|
|
2153
|
+
if (!record) {
|
|
2154
|
+
if (sessionId)
|
|
2155
|
+
ctx.broadcast({ type: "session.closed", sessionId });
|
|
2149
2156
|
return;
|
|
2157
|
+
}
|
|
2158
|
+
if (!sessionBusy(record)) {
|
|
2159
|
+
ctx.broadcast({ type: "session.state", sessionId: record.id, state: sessionState(record) });
|
|
2160
|
+
return;
|
|
2161
|
+
}
|
|
2150
2162
|
if (record.turnAttention)
|
|
2151
2163
|
turnWatchdog.resolveTurnAttention(record, "stop");
|
|
2152
2164
|
else
|
package/package.json
CHANGED