fix: settle WebSocket event waiters in linear time (#2389)