Bug 61851

Summary: WebSocket: WebSocketChannel::fail() should close the connection immediately
Product: WebKit Reporter: Yuta Kitamura <yutak>
Component: WebCore Misc.Assignee: Yuta Kitamura <yutak>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, tkent
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 61841    
Attachments:
Description Flags
Patch none

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.
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00#section-6
Comment 1 Yuta Kitamura 2011-06-01 03:31:17 PDT
Created attachment 95576 [details]
Patch
Comment 2 Kent Tamura 2011-06-01 17:36:01 PDT
Comment on attachment 95576 [details]
Patch

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

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.