Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2206)

Unified Diff: net/websockets/websocket_channel.cc

Issue 2845033002: Avoid sending double responding close control frames in WebSockets (Closed)
Patch Set: const -> constexpr Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel.cc
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index da32e2eea85446747666233f77a77fbedec9d0d8..8310aece7d5fe503ae0c27bd70ebf1380ad1a725 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -477,7 +477,8 @@ ChannelState WebSocketChannel::SendFlowControl(int64_t quota) {
pending_received_frames_.pop();
}
- if (pending_received_frames_.empty() && has_received_close_frame_) {
+ if (!InClosingState() && pending_received_frames_.empty() &&
+ has_received_close_frame_) {
// We've been waiting for the client to consume the frames before
// responding to the closing handshake initiated by the server.
return RespondToClosingHandshake();
« no previous file with comments | « no previous file | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698