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:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user