Skip to content

Commit

Permalink
Fix incorrect CHECK during client-side early pull
Browse files Browse the repository at this point in the history
  • Loading branch information
klzgrad committed Aug 21, 2023
1 parent 8ef1cec commit 9196d69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/net/tools/naive/naive_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,13 @@ int NaiveConnection::DoConnectServerComplete(int result) {
}

int NaiveConnection::Run(CompletionOnceCallback callback) {
DCHECK(sockets_[kClient]);
DCHECK(sockets_[kServer]);
DCHECK_EQ(next_state_, STATE_NONE);
DCHECK(!connect_callback_);

if (errors_[kClient] != OK)
// The client-side socket may be closed before the server-side
// socket is connected.
if (errors_[kClient] != OK || sockets_[kClient] == nullptr)
return errors_[kClient];
if (errors_[kServer] != OK)
return errors_[kServer];
Expand Down

0 comments on commit 9196d69

Please sign in to comment.