Commit 7977a93
feat(pglite-socket): handle CancelRequest wire protocol message
Rebased onto main, which now handles SSLRequest (replies 'N') via the
extracted handleSslRequest() method (#990).
Adapts the remaining CancelRequest handling to that same style as requested
in review: adds named CANCEL_REQUEST_CODE / CANCEL_REQUEST_LENGTH constants
(no magic numbers) and extracts the logic into a dedicated handleCancelRequest()
method called from the handleData() loop alongside handleSslRequest().
PGlite has no backend process to signal, so the request is consumed and
silently ignored (the protocol expects no response). Drops the now-redundant
inline SSL handling and SSL-specific tests (covered by upstream's
ssl-request.test.ts); keeps a CancelRequest integration test.1 parent 2dff2d2 commit 7977a93
3 files changed
Lines changed: 64 additions & 0 deletions
File tree
- .changeset
- packages/pglite-socket
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
346 | 348 | | |
347 | 349 | | |
348 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
349 | 371 | | |
350 | 372 | | |
351 | 373 | | |
| |||
368 | 390 | | |
369 | 391 | | |
370 | 392 | | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
371 | 397 | | |
372 | 398 | | |
373 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
792 | 793 | | |
793 | 794 | | |
794 | 795 | | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
795 | 826 | | |
796 | 827 | | |
797 | 828 | | |
| |||
0 commit comments