Bug 61851 - WebSocket: WebSocketChannel::fail() should close the connection immediately
Summary: WebSocket: WebSocketChannel::fail() should close the connection immediately
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yuta Kitamura
Depends on:
Blocks: 61841
  Show dependency treegraph
Reported: 2011-06-01 03:01 PDT by Yuta Kitamura
Modified: 2011-06-01 19:53 PDT (History)
3 users (show)

See Also:

Patch (2.16 KB, patch)
2011-06-01 03:31 PDT, Yuta Kitamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta Kitamura 2011-06-01 03:01:11 PDT
Currently WebSocketChannel::fail() calls m_handle->close() instead of m_handle->disconnect().

This was a mistake, because m_handle->close() may not close the connection immediately if it has unsent data. m_handle->disconnect() should have been used, since it does exactly the same thing as what we want to do.

For details, see how *fail the WebSocket connection* and *close the WebSocket connection* is defined in the protocol specification.
Comment 1 Yuta Kitamura 2011-06-01 03:31:17 PDT
Created attachment 95576 [details]
Comment 2 Kent Tamura 2011-06-01 17:36:01 PDT
Comment on attachment 95576 [details]

Looks ok.
Comment 3 WebKit Commit Bot 2011-06-01 19:53:26 PDT
Comment on attachment 95576 [details]

Clearing flags on attachment: 95576

Committed r87876: <http://trac.webkit.org/changeset/87876>
Comment 4 WebKit Commit Bot 2011-06-01 19:53:31 PDT
All reviewed patches have been landed.  Closing bug.