projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2da55bc
)
EVENT: when handling errors EAGAIN isn't fatal.
author
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 12 Jun 2012 21:19:14 +0000
(23:19 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Tue, 12 Jun 2012 21:19:14 +0000
(23:19 +0200)
citadel/event_client.c
patch
|
blob
|
history
diff --git
a/citadel/event_client.c
b/citadel/event_client.c
index c02f3bbea048bdde5a01d9b36ef353d1f4fc84a5..c4016dc1c6e2a3b4c53e3f39d5d4f58604ccd7af 100644
(file)
--- a/
citadel/event_client.c
+++ b/
citadel/event_client.c
@@
-584,7
+584,9
@@
IO_send_callback(struct ev_loop *loop, ev_io *watcher, int revents)
}
}
else if (rc < 0) {
}
}
else if (rc < 0) {
- IO_Timeout_callback(loop, &IO->rw_timeout, revents);
+ if (errno != EAGAIN) {
+ IO_Timeout_callback(loop, &IO->rw_timeout, revents);
+ }
}
/* else : must write more. */
}
}
/* else : must write more. */
}
@@
-806,12
+808,14
@@
IO_recv_callback(struct ev_loop *loop, ev_io *watcher, int revents)
IO_Timeout_callback(loop, &IO->rw_timeout, revents);
return;
} else if (nbytes == -1) {
IO_Timeout_callback(loop, &IO->rw_timeout, revents);
return;
} else if (nbytes == -1) {
- // FD is gone. kick it.
- StopClientWatchers(IO);
- EV_syslog(LOG_DEBUG,
- "EVENT: Socket Invalid! %s \n",
- strerror(errno));
- ShutDownCLient(IO);
+ if (errno != EAGAIN) {
+ // FD is gone. kick it.
+ StopClientWatchers(IO);
+ EV_syslog(LOG_DEBUG,
+ "EVENT: Socket Invalid! %s \n",
+ strerror(errno));
+ ShutDownCLient(IO);
+ }
return;
}
}
return;
}
}