}
/* if we're in the midst of processing something, don't die. */
- if ( !(dsi->flags & DSI_RUNNING) && (dsi->tickle >= AFPobj->options.timeout)) {
+ if (dsi->tickle >= AFPobj->options.timeout) {
LOG(log_error, logtype_afpd, "afp_alarm: child timed out, entering disconnected state");
if (dsi_disconnect(dsi) != 0)
afp_dsi_die(EXITERR_CLNT);
exit(0);
}
+#if 0
/* got ECONNRESET in read from client => exit*/
if (dsi->flags & DSI_GOT_ECONNRESET) {
LOG(log_note, logtype_afpd, "afp_over_dsi: client connection reset");
afp_dsi_close(obj);
exit(0);
}
+#endif
+
+ if (dsi->flags & DSI_RECONINPROG) {
+ LOG(log_note, logtype_afpd, "afp_over_dsi: failed reconnect");
+ afp_dsi_close(obj);
+ exit(0);
+ }
/* Some error on the client connection, enter disconnected state */
if (dsi_disconnect(dsi) != 0)
afp_dsi_die(EXITERR_CLNT);
- pause(); /* gets interrupted by SIGALARM or SIGURG tickle */
+ while (dsi->flags & DSI_DISCONNECTED)
+ pause(); /* gets interrupted by SIGALARM or SIGURG tickle */
continue; /* continue receiving until disconnect timer expires
* or a primary reconnect succeeds */
}
}
pending_request(dsi);
- vol_fce_tm_event();
+ fce_pending_events(obj);
}
/* error */