1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-17 00:23:24 +08:00
Commit Graph

3 Commits

  • Fix incorrect handling of StartChatRequest in websocket chat client
    Fixes this happening on staging:
    
    	[network] 2024-01-29 17:48:24 [verbose]: WebSocketNotificationsClientConnector connected!
    	[network] 2024-01-29 17:48:24 [verbose]: WebSocketNotificationsClientConnector connect attempt failed: Can't use WaitSafely from inside an async operation.
    
    I'm not sure how I ever allowed that `.WaitSafely()` to be there. It
    did feel rather dangerous but then I must have forgotten and never
    noticed it failing. Which is weird because you'd think that would be
    caught by testing that chat isn't working but I'm pretty sure that I
    tested that chat *was* indeed working.
    
    Anyway now that entire flow is replaced by something that should
    hopefully be somewhat more sane? It has a whole retry flow with logging
    now which should be more robust than what was there previously (failing
    to start to listen to chat events killing the entire websocket
    connection for very little good reason).
  • Decouple notifications websocket handling from chat operations
    This is a prerequisite for https://github.com/ppy/osu/pull/25480.
    
    The `WebSocketNotificationsClient` was tightly coupled to chat specifics
    making it difficult to use in the second factor verification flow.
    This commit's goal is to separate the websocket connection and message
    handling concerns from specific chat logic concerns.