| Index: content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| index 039c619ccf45ebe68b58ffca31c0c5a50b419fd7..937365771bf8b1da2b4d51542d7c7aaff47a4b81 100644
|
| --- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| +++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
|
| @@ -484,7 +484,11 @@ void P2PSocketHostTcpBase::DidCompleteRead(int result) {
|
| }
|
|
|
| bool P2PSocketHostTcpBase::SetOption(P2PSocketOption option, int value) {
|
| - DCHECK_EQ(STATE_OPEN, state_);
|
| + if (state_ != STATE_OPEN) {
|
| + DCHECK_EQ(state_, STATE_ERROR);
|
| + return false;
|
| + }
|
| +
|
| switch (option) {
|
| case P2P_SOCKET_OPT_RCVBUF:
|
| return socket_->SetReceiveBufferSize(value) == net::OK;
|
|
|