File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -168,8 +168,9 @@ export class LogicalReplicationService extends EventEmitter2 implements LogicalR
168168
169169 /**
170170 * @param lsn
171+ * @param ping Request server to respond
171172 */
172- public async acknowledge ( lsn : string ) : Promise < boolean > {
173+ public async acknowledge ( lsn : string , ping : boolean = false ) : Promise < boolean > {
173174 if ( this . _stop ) return false ;
174175 this . lastStandbyStatusUpdatedTime = Date . now ( ) ;
175176
@@ -209,7 +210,7 @@ export class LogicalReplicationService extends EventEmitter2 implements LogicalR
209210 response . writeUInt32BE ( lowerTimestamp , 29 ) ;
210211
211212 // If 1, requests server to respond immediately - can be used to verify connectivity
212- response . writeInt8 ( 0 , 33 ) ;
213+ response . writeInt8 ( ping ? 1 : 0 , 33 ) ;
213214
214215 // @ts -ignore
215216 this . _connection ?. sendCopyFromChunk ( response ) ;
You can’t perform that action at this time.
0 commit comments