- yaz_log(YLOG_WARN, "No task was executed for connection");
- iochan_setflags(co->iochan, ZOOM_connection_get_mask(co->link));
- iochan_setfd(co->iochan, ZOOM_connection_get_socket(co->link));
+ {
+ const char *error, *addinfo;
+ int err;
+ if ((err = ZOOM_connection_error(co->link, &error, &addinfo)))
+ {
+ if (co->client)
+ {
+ yaz_log(YLOG_LOG, "Error %s from %s",
+ error, client_get_id(co->client));
+ client_set_diagnostic(co->client, err);
+ client_set_state_nb(co->client, Client_Error);
+ }
+ }
+ }
+ else
+ {
+ iochan_setflags(co->iochan, ZOOM_connection_get_mask(co->link));
+ iochan_setfd(co->iochan, ZOOM_connection_get_socket(co->link));
+ }