Check response 0 on disconnect
From recv(): The return value will be 0 when the peer has performed an orderly shutdown
This commit is contained in:
parent
e32d001809
commit
f8cc752a9a
@ -118,5 +118,8 @@ bool BaseConnection::Read(void* data, size_t length)
|
|||||||
}
|
}
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
else if (res == 0) {
|
||||||
|
Close();
|
||||||
|
}
|
||||||
return res == (int)length;
|
return res == (int)length;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user