mirror of https://git.kore.io/kore.git
if read() return EINTER,retry
This commit is contained in:
parent
ed8110f109
commit
490163de4a
|
@ -334,6 +334,8 @@ net_write(struct connection *c, int len, int *written)
|
||||||
if (r <= -1) {
|
if (r <= -1) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EINTR:
|
case EINTR:
|
||||||
|
*written = 0;
|
||||||
|
return (KORE_RESULT_OK);
|
||||||
case EAGAIN:
|
case EAGAIN:
|
||||||
c->flags &= ~CONN_WRITE_POSSIBLE;
|
c->flags &= ~CONN_WRITE_POSSIBLE;
|
||||||
return (KORE_RESULT_OK);
|
return (KORE_RESULT_OK);
|
||||||
|
@ -357,6 +359,8 @@ net_read(struct connection *c, int *bytes)
|
||||||
if (r <= 0) {
|
if (r <= 0) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EINTR:
|
case EINTR:
|
||||||
|
*bytes = 0;
|
||||||
|
return (KORE_RESULT_OK);
|
||||||
case EAGAIN:
|
case EAGAIN:
|
||||||
c->flags &= ~CONN_READ_POSSIBLE;
|
c->flags &= ~CONN_READ_POSSIBLE;
|
||||||
return (KORE_RESULT_OK);
|
return (KORE_RESULT_OK);
|
||||||
|
|
Loading…
Reference in New Issue