[whatwg] Thread to run Web Socket feedback from the protocol ?
Ian Hickson
ian at hixie.ch
Wed Dec 9 10:40:41 PST 2009
On Wed, 9 Dec 2009, Alexey Proskuryakov wrote:
> On 09.12.2009, at 10:07, Ian Hickson wrote:
> > > >
> > > > I'm absolutely fine with changing WebSocket to change readyState
> > > > as part of the same task that dispatches the event
> > >
> > > Yes, that is what I think the spec should say.
> >
> > Done.
>
> With the updated text, there is a race condition between closing a
> socket and removing all data that was received. The spec says "When a
> user agent is to close the Web Socket connection, it must drop all
> subsequent data from the server" - but with the current spec text, you
> can get message events after you call close() from onopen handler.
Fixed. This also makes readyState change to CLOSED as soon as you call
close() (the 'close' event is still queued, though, it doesn't fire
synchronously during the close() call).
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list