From a5cd8113cad622fafc1f6cfadccc11759ef36136 Mon Sep 17 00:00:00 2001 From: "louis.tian" Date: Mon, 29 Jan 2024 15:36:50 +1100 Subject: [PATCH] update lsn on Primary Keep Alive Message --- src/subscribe.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/subscribe.js b/src/subscribe.js index decb42c6..3db2f43b 100644 --- a/src/subscribe.js +++ b/src/subscribe.js @@ -110,8 +110,10 @@ export default function Subscribe(postgres, options) { function data(x) { if (x[0] === 0x77) parse(x.subarray(25), state, sql.options.parsers, handle, options.transform) - else if (x[0] === 0x6b && x[17]) + else if (x[0] === 0x6b && x[17]) { + state.lsn = x.subarray(1, 9) pong() + } } function handle(a, b) {