MCPcopy Create free account
hub / github.com/apache/cloudberry / pqWaitTimeout

Function pqWaitTimeout

src/interfaces/libpq/fe-misc.c:1110–1124  ·  view source on GitHub ↗

* pgWaitTimeout: wait, but not past finish_time. * wrapper for pqSocketCheck. * * finish_time = ((time_t) -1) disables the wait limit. */

Source from the content-addressed store, hash-verified

1108 * finish_time = ((time_t) -1) disables the wait limit.
1109 */
1110int
1111pqWaitTimeout(int forRead, int forWrite, PGconn *conn, time_t finish_time)
1112{
1113 int result;
1114
1115 result = pqSocketCheck(conn, forRead, forWrite, finish_time);
1116
1117 if (result == 0)
1118 {
1119 printfPQExpBuffer(&conn->errorMessage,
1120 libpq_gettext("timeout expired\n"));
1121 }
1122
1123 return result;
1124}
1125
1126/*
1127 * pqReadReady: is select() saying the file is ready to read?

Callers

nothing calls this directly

Calls 3

pqSocketCheckFunction · 0.85
printfPQExpBufferFunction · 0.85
libpq_gettextFunction · 0.85

Tested by

no test coverage detected