Skip to content

Commit

Permalink
fix: websocket port
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-abarzua committed Nov 17, 2023
1 parent 1804b0d commit a1e85c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion backend/src/routers/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def list_configs() -> Dict[Any, Any]:
def websocket_info(
controller: ArmController = controller_dependency,
) -> Dict[Any, Any]:

return {
"websocket_port": controller.websocket_port,
}
2 changes: 2 additions & 0 deletions frontend/src/components/armsimulation/ArmSimulation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const ArmSimulation = () => {
setWebsocketPort(websocket_port || null);
setWebsocketHost(import.meta.env.VITE_ARM_SIMULATION_WEBSOCKET_HOST || null);
setSimulationUrl(import.meta.env.VITE_ARM_SIMULATION_URL || null);

if (window.location.protocol === 'https:') {
setWebsocketHost(prev => `${prev}/w${websocket_port}`);
setWebsocketProtocol('wss');
} else {
setWebsocketProtocol('ws');
Expand Down

0 comments on commit a1e85c5

Please sign in to comment.