#WebSockets

2 items tagged “WebSockets

TILReal-time5 min read

Server-Sent Events Instead of WebSockets for Live Vote Counts

TIL that live vote tallies only need server-to-client push, not a full-duplex protocol — swapping a hand-rolled WebSocket setup for Server-Sent Events dropped the reconnection logic entirely and simplified the reverse proxy config.

#Server-Sent Events
TILBackend3 min read

A Dead WebSocket in a Broadcast List Breaks the Whole Broadcast Loop

TIL that looping over every connected WebSocket client and sending a message throws on the first one that's already gone, which silently drops the update for everyone still connected after it in the list — the fix is a try/except per connection, not around the loop.

#WebSockets