mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2026-05-28 18:06:32 +03:00
Fix invalid state when disconnecting idle socket during connect
This commit is contained in:
@@ -134,7 +134,10 @@ void NaiveConnection::DoCallback(int result) {
|
||||
}
|
||||
|
||||
void NaiveConnection::OnIOComplete(int result) {
|
||||
DCHECK_NE(next_state_, STATE_NONE);
|
||||
if (next_state_ == STATE_NONE) {
|
||||
// Disconnect() was called during client or server socket Connect().
|
||||
return;
|
||||
}
|
||||
int rv = DoLoop(result);
|
||||
if (rv != ERR_IO_PENDING) {
|
||||
DoCallback(rv);
|
||||
|
||||
Reference in New Issue
Block a user