W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] Web Sockets API — send() with closed connections

From: Avi Flax <avif@arc90.com>
Date: Tue, 27 Oct 2009 13:41:29 -0400
Message-ID: <5c02bc4e0910271041n4b42b240kdb25bae0aa8d2170@mail.gmail.com>
On Tue, Oct 27, 2009 at 01:17, Ian Hickson <ian at hixie.ch> wrote:


> The connection might get closed at any point, e.g. between the script
> checking if the connection might be closed and the script calling the
> send() method. Because of this, if we raised an exception when the
> connection was closed, we'd run the risk of the script randomly throwing
> an exception in a way that the author likely did not check for.
>
> This isn't a problem for the CONNECTING case, since there is an event that
> fires before the script can use the send() method, and thus the author is
> unlikely to accidentally run into that exception in a way that wouldn't
> be quickly caught in testing.


Makes sense. Thanks!

-- 
Avi Flax ? Partner ? Arc90 ? http://arc90.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091027/48019ac8/attachment-0001.htm>
Received on Tuesday, 27 October 2009 10:41:29 UTC

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