simple error handling in write handler
This commit is contained in:
parent
65f2f862f8
commit
cd79383202
@ -401,10 +401,19 @@ static int write_all (int fd, const char* ptr, moo_oow_t len)
|
|||||||
|
|
||||||
if (wr <= -1)
|
if (wr <= -1)
|
||||||
{
|
{
|
||||||
/*if (errno == EAGAIN || errno == EWOULDBLOCK)
|
#if defined(EAGAIN) && defined(EWOULDBLOCK) && (EAGAIN == EWOULDBLOCK)
|
||||||
{
|
/* TODO: push it to internal buffers? before writing data just converted, need to write buffered data first. */
|
||||||
push it to internal buffers? before writing data just converted, need to write buffered data first.
|
if (errno == EAGAIN) continue;
|
||||||
}*/
|
#else
|
||||||
|
|
||||||
|
#if defined(EAGAIN)
|
||||||
|
if (errno == EAGAIN) continue;
|
||||||
|
#endif
|
||||||
|
#if defined(EWOULDBLOCK)
|
||||||
|
if (errno == EWOULDBLOCK) continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user