| Index: webrtc/base/socketpool.cc
|
| diff --git a/webrtc/base/socketpool.cc b/webrtc/base/socketpool.cc
|
| index cdd54bb659e62fa12f5c2837d798603708d5ad74..f316193b6e50f53e118aaf417813faafbc467e30 100644
|
| --- a/webrtc/base/socketpool.cc
|
| +++ b/webrtc/base/socketpool.cc
|
| @@ -151,14 +151,14 @@ ReuseSocketPool::ReuseSocketPool(SocketFactory* factory)
|
| }
|
|
|
| ReuseSocketPool::~ReuseSocketPool() {
|
| - ASSERT(!checked_out_);
|
| + RTC_DCHECK(!checked_out_);
|
| delete stream_;
|
| }
|
|
|
| StreamInterface*
|
| ReuseSocketPool::RequestConnectedStream(const SocketAddress& remote, int* err) {
|
| // Only one socket can be used from this "pool" at a time
|
| - ASSERT(!checked_out_);
|
| + RTC_DCHECK(!checked_out_);
|
| if (!stream_) {
|
| LOG_F(LS_VERBOSE) << "Creating new socket";
|
| int family = remote.family();
|
| @@ -198,8 +198,8 @@ ReuseSocketPool::RequestConnectedStream(const SocketAddress& remote, int* err) {
|
|
|
| void
|
| ReuseSocketPool::ReturnConnectedStream(StreamInterface* stream) {
|
| - ASSERT(stream == stream_);
|
| - ASSERT(checked_out_);
|
| + RTC_DCHECK(stream == stream_);
|
| + RTC_DCHECK(checked_out_);
|
| checked_out_ = false;
|
| // Until the socket is reused, monitor it to determine if it closes.
|
| stream_->SignalEvent.connect(this, &ReuseSocketPool::OnStreamEvent);
|
| @@ -207,8 +207,8 @@ ReuseSocketPool::ReturnConnectedStream(StreamInterface* stream) {
|
|
|
| void
|
| ReuseSocketPool::OnStreamEvent(StreamInterface* stream, int events, int err) {
|
| - ASSERT(stream == stream_);
|
| - ASSERT(!checked_out_);
|
| + RTC_DCHECK(stream == stream_);
|
| + RTC_DCHECK(!checked_out_);
|
|
|
| // If the stream was written to and then immediately returned to us then
|
| // we may get a writable notification for it, which we should ignore.
|
| @@ -220,7 +220,7 @@ ReuseSocketPool::OnStreamEvent(StreamInterface* stream, int events, int err) {
|
| // If the peer sent data, we can't process it, so drop the connection.
|
| // If the socket has closed, clean it up.
|
| // In either case, we'll reconnect it the next time it is used.
|
| - ASSERT(0 != (events & (SE_READ|SE_CLOSE)));
|
| + RTC_DCHECK(0 != (events & (SE_READ | SE_CLOSE)));
|
| if (0 != (events & SE_CLOSE)) {
|
| LOG_F(LS_VERBOSE) << "Connection closed with error: " << err;
|
| } else {
|
| @@ -250,7 +250,7 @@ LoggingPoolAdapter::~LoggingPoolAdapter() {
|
| StreamInterface* LoggingPoolAdapter::RequestConnectedStream(
|
| const SocketAddress& remote, int* err) {
|
| if (StreamInterface* stream = pool_->RequestConnectedStream(remote, err)) {
|
| - ASSERT(SS_CLOSED != stream->GetState());
|
| + RTC_DCHECK(SS_CLOSED != stream->GetState());
|
| std::stringstream ss;
|
| ss << label_ << "(0x" << std::setfill('0') << std::hex << std::setw(8)
|
| << stream << ")";
|
|
|