* handleSyncLoss: clean up after loss of message-boundary sync * * There isn't really a lot we can do here except abandon the connection. */
| 631 | * There isn't really a lot we can do here except abandon the connection. |
| 632 | */ |
| 633 | static void |
| 634 | handleSyncLoss(PGconn *conn, char id, int msgLength) |
| 635 | { |
| 636 | appendPQExpBuffer(&conn->errorMessage, |
| 637 | libpq_gettext("lost synchronization with server: got message type \"%c\", length %d\n"), |
| 638 | id, msgLength); |
| 639 | /* build an error result holding the error message */ |
| 640 | pqSaveErrorResult(conn); |
| 641 | conn->asyncStatus = PGASYNC_READY; /* drop out of PQgetResult wait loop */ |
| 642 | /* flush input data since we're giving up on processing it */ |
| 643 | pqDropConnection(conn, true); |
| 644 | conn->status = CONNECTION_BAD; /* No more connection to backend */ |
| 645 | } |
| 646 | |
| 647 | /* |
| 648 | * parseInput subroutine to read a 'T' (row descriptions) message. |
no test coverage detected