- if we call the timeout function directly we might find upper stackframes which rely on the event-context still being valid. Thus we rather set a timeout of 0.0 which then calls the timeout function and kills the context.
}
else if (rc < 0) {
if (errno != EAGAIN) {
}
else if (rc < 0) {
if (errno != EAGAIN) {
+ StopClientWatchers(IO);
EV_syslog(LOG_DEBUG,
"EVENT: Socket Invalid! [%d] [%s] [%d]\n",
errno, strerror(errno), IO->SendBuf.fd);
EV_syslog(LOG_DEBUG,
"EVENT: Socket Invalid! [%d] [%s] [%d]\n",
errno, strerror(errno), IO->SendBuf.fd);
- IO_Timeout_callback(loop, &IO->rw_timeout, revents);
+ StrBufPrintf(IO->ErrMsg,
+ "Socket Invalid! [%s]",
+ strerror(errno));
+ SetNextTimeout(IO, 0.0);
}
}
/* else : must write more. */
}
}
/* else : must write more. */
if (nbytes > 0) {
HandleInbound(IO);
} else if (nbytes == 0) {
if (nbytes > 0) {
HandleInbound(IO);
} else if (nbytes == 0) {
- IO_Timeout_callback(loop, &IO->rw_timeout, revents);
+ SetNextTimeout(IO, 0.0);
return;
} else if (nbytes == -1) {
if (errno != EAGAIN) {
return;
} else if (nbytes == -1) {
if (errno != EAGAIN) {
EV_syslog(LOG_DEBUG,
"EVENT: Socket Invalid! [%d] [%s] [%d]\n",
errno, strerror(errno), IO->SendBuf.fd);
EV_syslog(LOG_DEBUG,
"EVENT: Socket Invalid! [%d] [%s] [%d]\n",
errno, strerror(errno), IO->SendBuf.fd);
+ StrBufPrintf(IO->ErrMsg,
+ "Socket Invalid! [%s]",
+ strerror(errno));
+ SetNextTimeout(IO, 0.0);