Repository navigation
Conversation
| if is_session: | ||
| if missing := next((key for key in ("session_id", "app_url", "control_url") if not _string_value(data.get(key))), None): | ||
| raise LivepeerGatewayError(f"runner session response missing {missing}") | ||
| if session_id and not (session_id == data["session_id"] == data["session_id"].strip()): |
Comment on lines
+985
to
+987
| if is_session and re.fullmatch(r"[\w-]{1,128}", session_id, re.ASCII): | ||
| with contextlib.suppress(Exception): | ||
| await _post_empty(_join_endpoint(runner_url, f"{session_id}/stop"), allow_redirects=False) |
Comment on lines
+985
to
+987
| if is_session and re.fullmatch(r"[\w-]{1,128}", session_id, re.ASCII): | ||
| with contextlib.suppress(Exception): | ||
| await _post_empty(_join_endpoint(runner_url, f"{session_id}/stop"), allow_redirects=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Validate buffered Node session replies in
call_runner()before using a session ID from an offchain reply. Onchain replies must match the ID from the payment challenge. If validation fails, use that challenge ID for one best-effort stop through the existing Node stop endpoint and preserve the original error.Session selection skips single-shot runners and tries the next candidate after a rejected reply, even if the stop fails.