#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
+#include <syslog.h>
+#include <unistd.h>
#include "glite/jobid/strmd5.h"
#include "glite/lbu/trio.h"
if ( edg_wll_ExecSQL(ctx, stmt, NULL) < 0 )
goto rollback;
edg_wll_NotifCancelRegId(ctx, nid);
+ if (edg_wll_Error(ctx, NULL, NULL) == ECONNREFUSED) {
+ /* Let notification erase from DB,
+ * on notif-IL side it will be autopurged later anyway */
+
+ fprintf(stderr,"[%d] edg_wll_NotifDropServer() - NotifID found and dropped,"\
+ " however, connection to notif-IL was refused (notif-IL not running?)\n", getpid());
+ syslog(LOG_INFO,"edg_wll_NotifDropServer() - NotifID found and dropped,"\
+ " however, connection to notif-IL was refused (notif-IL not running?)");
+
+ edg_wll_ResetError(ctx);
+ }
rollback:
free(nid_s); nid_s = NULL;
req_cnt++;
first_request = 0;
to = set_request_to;
- if ((rv = services[srv].on_request_hnd(conn,to.tv_sec>=0 ? &to : NULL,clnt_data)) == ENOTCONN) {
+ rv = services[srv].on_request_hnd(conn,to.tv_sec>=0 ? &to : NULL,clnt_data);
+ if ( (rv == ENOTCONN) || (rv == ECONNREFUSED) ) {
if (services[srv].on_disconnect_hnd
&& (rv = services[srv].on_disconnect_hnd(conn,NULL,clnt_data)))
{