W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2010

[whatwg] Collection garbage on WebSockets

From: Wellington Fernando de Macedo <wfernandom2004@gmail.com>
Date: Mon, 28 Jun 2010 11:42:45 -0300
Message-ID: <4C28B4E5.9000602@gmail.com>

Em 28/06/2010 11:28, Simon Pieters escreveu:
>>   * When at least one open or message events has been received, and 
>> there are
>> close events listeners (the close event could be flagged as 'strong' 
>> in this
>> case);
>
> You can get close event without an open event first. (I don't think 
> Firefox gets this right currently.) 
That situation only can happen (in Firefox) when the js script calls the 
Close() method and the readyState == CONNECTING.
When the connection can't be established for any reason the WebSocket 
object stays in the CONNECTING
readyState and doesn't dispatch any events. That behavior is because of 
the section "6.1. Client-initiated closure"
of the WebSocket protocol spec, in order to prevent script to 
distinguish any of the situations listed there.

> Also see 
> http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-May/026400.html 
> (we have implemented this policy). 
Thanks!

Wellington.
Received on Monday, 28 June 2010 07:42:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:24 UTC