From: Pavan Deolasee Date: Mon, 22 Oct 2018 10:54:47 +0000 (+0530) Subject: Catch and report GTM errors correctly X-Git-Tag: XL_10_R1~7 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=12e72b187379b9a2a2ef8185132b60afac0b7555;p=postgres-xl.git Catch and report GTM errors correctly If the connection with the GTM is dropped, we should ensure that the caller gets to see the error. This fixes some of the issues noticed during GTM stop/start tests. --- diff --git a/src/gtm/client/fe-protocol.c b/src/gtm/client/fe-protocol.c index fc3988d559..d4be13803c 100644 --- a/src/gtm/client/fe-protocol.c +++ b/src/gtm/client/fe-protocol.c @@ -137,6 +137,7 @@ pqParseInput(GTM_Conn *conn) "unexpected response from server; first received character was \"%c\"\n", id); conn->inCursor += msgLength; + result->gr_status = GTM_RESULT_ERROR; break; } /* switch on protocol character */ /* Successfully consumed this message */ @@ -148,6 +149,7 @@ pqParseInput(GTM_Conn *conn) else { /* Trouble --- report it */ + result->gr_status = GTM_RESULT_ERROR; printfGTMPQExpBuffer(&conn->errorMessage, "message contents do not agree with length in message type \"%c\"\n", id);