Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dsrouter] fix web socket startup #5121

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pavelsavara
Copy link
Member

  • make the default value valid ws://127.0.0.1:8088/diagnostics
  • fix parsing the URL, so that HTTP server could be started based on ws:// or wss:// as it only accepts http:// or https:// schema

@pavelsavara
Copy link
Member Author

cc @lateralusX

@@ -211,7 +211,7 @@ private static Option WebSocketURLAddressOption() =>
description: "The router WebSocket address using format ws://[host]:[port]/[path] or wss://[host]:[port]/[path]. " +
"Launch app with WasmExtraConfig property specifying diagnostic_options with a server connect_url")
{
Argument = new Argument<string>(name: "webSocketURI", getDefaultValue: () => "")
Argument = new Argument<string>(name: "webSocketURI", getDefaultValue: () => "ws://127.0.0.1:8088/diagnostics")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to already be set as the default value as part of WeSocketServerRouterFactory,

_webSocketURL = string.IsNullOrEmpty(webSocketURL) ? "ws://127.0.0.1:8088/diagnostics" : webSocketURL;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it also needs to flow into WebSocketServerImpl.ParseWebSocketURL otherwise it throws on empty value and continues starting silently without actually working!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let me check that, sound like that parsing should be done elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants