mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-25 21:33:20 +08:00
Merged Win32 updates. Added full warnings on g++. Fixed bug in
client when handling server rejection.
This commit is contained in:
@@ -424,6 +424,12 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout)
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
CArchNetworkBSD::unblockPollSocket(CArchThread thread)
|
||||
{
|
||||
CArchMultithreadPosix::getInstance()->unblockThread(thread);
|
||||
}
|
||||
|
||||
size_t
|
||||
CArchNetworkBSD::readSocket(CArchSocket s, void* buf, size_t len)
|
||||
{
|
||||
@@ -435,8 +441,8 @@ CArchNetworkBSD::readSocket(CArchSocket s, void* buf, size_t len)
|
||||
if (n == -1) {
|
||||
if (errno == EINTR) {
|
||||
// interrupted system call
|
||||
ARCH->testCancelThread();
|
||||
continue;
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
else if (errno == EAGAIN) {
|
||||
n = 0;
|
||||
@@ -460,8 +466,8 @@ CArchNetworkBSD::writeSocket(CArchSocket s, const void* buf, size_t len)
|
||||
if (n == -1) {
|
||||
if (errno == EINTR) {
|
||||
// interrupted system call
|
||||
ARCH->testCancelThread();
|
||||
continue;
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
else if (errno == EAGAIN) {
|
||||
// no buffer space
|
||||
|
||||
Reference in New Issue
Block a user