This is the last part of bug 61115.
Created attachment 95561 [details] Patch
Comment on attachment 95561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95561&action=review > Source/WebCore/websockets/WebSocketChannel.cpp:337 > - if (!m_closed) > - m_handle->disconnect(); > + fail(m_handshake.failureReason()); This looks a behavior change. fail() calls m_handle->close(), not m_handle->disconnect(), right?
Comment on attachment 95561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95561&action=review >> Source/WebCore/websockets/WebSocketChannel.cpp:337 >> + fail(m_handshake.failureReason()); > > This looks a behavior change. > fail() calls m_handle->close(), not m_handle->disconnect(), right? Good point. This sounds like a bug of fail(), rather than of this patch. I should have used m_handle->disconnect() in fail(), because we don't have to wait for unsent data to be sent (difference between m_handle->close() and m_handle->disconnect() is that the former does not close the connection until the socket finishes to send all data while the latter immediately closes the connection). I will create a new bug and fix this.
Comment on attachment 95561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95561&action=review >>> Source/WebCore/websockets/WebSocketChannel.cpp:337 >>> + fail(m_handshake.failureReason()); >> >> This looks a behavior change. >> fail() calls m_handle->close(), not m_handle->disconnect(), right? > > Good point. > > This sounds like a bug of fail(), rather than of this patch. I should have used m_handle->disconnect() in fail(), because we don't have to wait for unsent data to be sent (difference between m_handle->close() and m_handle->disconnect() is that the former does not close the connection until the socket finishes to send all data while the latter immediately closes the connection). > > I will create a new bug and fix this. Now m_handle->disconnect() is used in fail(), so this line is no longer a behavior change.
Comment on attachment 95561 [details] Patch ok!
Comment on attachment 95561 [details] Patch Clearing flags on attachment: 95561 Committed r87883: <http://trac.webkit.org/changeset/87883>
All reviewed patches have been landed. Closing bug.