Skip to content

Commit 84583e0

Browse files
committed
Only call setKeepAlive if present - fixes porsager#404
1 parent 088ab2f commit 84583e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/connection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
354354
statementCount = 1
355355
lifeTimer.start()
356356
socket.on('data', data)
357-
keep_alive && socket.setKeepAlive(true, 1000 * keep_alive)
357+
keep_alive && socket.setKeepAlive && socket.setKeepAlive(true, 1000 * keep_alive)
358358
const s = StartupMessage()
359359
write(s)
360360
} catch (err) {

0 commit comments

Comments
 (0)