Wed Mar 10 01:32:19 PST 2010
- Next message: [Slony1-hackers] PATCH Check return of sched_wait_time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Otherwise this might loop for five minutes until execution is terminated by remote_listen_timeout. Signed-off-by: Ulrich Weber <uweber at astaro.com> --- src/slon/remote_listen.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/slon/remote_listen.c b/src/slon/remote_listen.c index 58e461b..63331e8 100644 --- a/src/slon/remote_listen.c +++ b/src/slon/remote_listen.c @@ -671,6 +671,7 @@ remoteListen_receive_events(SlonNode * node, SlonConn * conn, int tupno; time_t timeout; time_t now; + ScheduleStatus rc; dstring_init(&query); @@ -762,8 +763,11 @@ remoteListen_receive_events(SlonNode * node, SlonConn * conn, dstring_free(&query); return -1; } - if (PQisBusy(conn->dbconn) != 0) - sched_wait_time(conn, SCHED_WAIT_SOCK_READ, 10000); + if (PQisBusy(conn->dbconn) != 0) { + rc = sched_wait_time(conn, SCHED_WAIT_SOCK_READ, 10000); + if (rc != SCHED_STATUS_OK && rc != SCHED_STATUS_CANCEL) + break; + } } res = PQgetResult(conn->dbconn); -- 1.6.3.3 --------------010001080600080909020205--
- Next message: [Slony1-hackers] PATCH Check return of sched_wait_time
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-hackers mailing list