* pgWaitTimeout: wait, but not past finish_time. * wrapper for pqSocketCheck. * * finish_time = ((time_t) -1) disables the wait limit. */
| 1108 | * finish_time = ((time_t) -1) disables the wait limit. |
| 1109 | */ |
| 1110 | int |
| 1111 | pqWaitTimeout(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? |
nothing calls this directly
no test coverage detected