summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/websockets/websocket.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/websockets/websocket.cc b/net/websockets/websocket.cc
index c079aa5..fa6f180 100644
--- a/net/websockets/websocket.cc
+++ b/net/websockets/websocket.cc
@@ -209,7 +209,10 @@ void WebSocket::OnError(const SocketStream* socket_stream, int error) {
void WebSocket::SendPending() {
DCHECK(MessageLoop::current() == origin_loop_);
- DCHECK(socket_stream_);
+ if (!socket_stream_) {
+ DCHECK_EQ(CLOSED, ready_state_);
+ return;
+ }
if (!current_write_buf_) {
if (pending_write_bufs_.empty()) {
if (client_closing_handshake_) {