Skip to content

fix: reconnect WebSocket after login/logout in R19 admin UI#2403

Merged
tkurki merged 1 commit intoSignalK:masterfrom
dirkwa:fix-admin-ws-reconnect
Mar 3, 2026
Merged

fix: reconnect WebSocket after login/logout in R19 admin UI#2403
tkurki merged 1 commit intoSignalK:masterfrom
dirkwa:fix-admin-ws-reconnect

Conversation

@dirkwa
Copy link
Contributor

@dirkwa dirkwa commented Mar 3, 2026

After login or logout, the R19 admin UI did not reconnect its WebSocket. This meant the server kept the old authentication state for the connection — an admin who logged in wouldn't receive admin-only events like ACCESS_REQUEST, and logging out wouldn't drop those subscriptions until page refresh.

Now the WebSocket is explicitly reconnected after login and logout so the server associates the correct authentication state with event subscriptions.

Also adds handling for the RECEIVE_LOGIN_STATUS server event so login state updates are pushed to the UI in real time.

Testing done

  • Verified anonymous WS connection receives hello message
  • Verified authenticated WS connection receives server events (VESSEL_INFOPROVIDERSTATUSSERVERSTATISTICSRECEIVE_LOGIN_STATUS, etc.)
  • Verified WS reconnect flow: disconnect and reconnect with new auth state correctly establishes new server event subscriptions

Reconnect the admin UI WebSocket connection after login and logout so
the server associates the correct authentication state with event
subscriptions like ACCESS_REQUEST and DISCOVERY_CHANGED.
@tkurki tkurki added the fix label Mar 3, 2026
@tkurki tkurki merged commit 7e47d6f into SignalK:master Mar 3, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants