diff options
author | yhirano@chromium.org <yhirano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 10:32:48 +0000 |
---|---|---|
committer | yhirano@chromium.org <yhirano@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 10:32:48 +0000 |
commit | 2520e0634f60c1ac367f9a6267596faf349c1f5f (patch) | |
tree | bc3c6bac9f6c05b0fc88f9355f80fc20a9d14270 /net/websockets/websocket_channel.cc | |
parent | c487bc32436c52258e68d3e46b7be922c400ae7d (diff) | |
download | chromium_src-2520e0634f60c1ac367f9a6267596faf349c1f5f.zip chromium_src-2520e0634f60c1ac367f9a6267596faf349c1f5f.tar.gz chromium_src-2520e0634f60c1ac367f9a6267596faf349c1f5f.tar.bz2 |
[WebSocket] Send a close frame when the renderer process is gone.
Renderer processes may die without clearing its |WebSocketBridge|s.
It is helpful to send a close frame with code = 1001 in such a case.
BUG=392534
R=ricea@chromium.org
Review URL: https://codereview.chromium.org/390773002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285557 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets/websocket_channel.cc')
-rw-r--r-- | net/websockets/websocket_channel.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc index 12f152f..767d632 100644 --- a/net/websockets/websocket_channel.cc +++ b/net/websockets/websocket_channel.cc @@ -465,6 +465,8 @@ void WebSocketChannel::SendFlowControl(int64 quota) { void WebSocketChannel::StartClosingHandshake(uint16 code, const std::string& reason) { if (InClosingState()) { + // When the associated renderer process is killed while the channel is in + // CLOSING state we reach here. DVLOG(1) << "StartClosingHandshake called in state " << state_ << ". This may be a bug, or a harmless race."; return; |