arnacon-webrtc-service 0.2.7 → 0.2.8
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/package.json +1 -1
- package/webRTCservice/webRTCmanager.js +15 -12
package/package.json
CHANGED
|
@@ -1221,18 +1221,21 @@ function onDataChannelMessage(sessionId, rawMessage, meta = {}) {
|
|
|
1221
1221
|
poly.onIngress(ref, event).catch((err) => {
|
|
1222
1222
|
if (action === "offer" && isRecoverableOfferIngressError(err) && !payload.__polyIngressRetriedOnce) {
|
|
1223
1223
|
payload.__polyIngressRetriedOnce = true;
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1224
|
+
// Keep the current poly/session/PC alive and retry ingress in place.
|
|
1225
|
+
// This mirrors client-side reuse semantics after decline/end flows.
|
|
1226
|
+
const latestSession = sessions.get(sessionId);
|
|
1227
|
+
const latestPoly = latestSession ? polyForSession(latestSession) : null;
|
|
1228
|
+
if (!latestSession || !latestPoly) {
|
|
1229
|
+
console.error(`[${sessionId}] poly ingress (${action}) retry skipped: no active session/poly`);
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1232
|
+
const retryRef = polyWebrtcRef(latestPoly, latestSession, channelRole);
|
|
1233
|
+
const retryEvent = polyIngress.toLegEvent(action, payload, { channelRole });
|
|
1234
|
+
if (!retryEvent) {
|
|
1235
|
+
console.error(`[${sessionId}] poly ingress (${action}) retry skipped: no retry event`);
|
|
1236
|
+
return;
|
|
1237
|
+
}
|
|
1238
|
+
latestPoly.onIngress(retryRef, retryEvent).catch((retryErr) => {
|
|
1236
1239
|
console.error(`[${sessionId}] poly ingress (${action}) retry failed: ${retryErr.message}`);
|
|
1237
1240
|
});
|
|
1238
1241
|
return;
|