Skip to content

Commit ca82df9

Browse files
committed
Don't gracefully handle unknown messages, just fail
1 parent c3589f9 commit ca82df9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/connection.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function Connection(options = {}) {
161161
if (length >= buffer.length)
162162
break
163163

164-
(backend[buffer[0]] || unknown)(buffer.slice(0, length + 1))
164+
backend[buffer[0]](buffer.slice(0, length + 1))
165165
buffer = buffer.slice(length + 1)
166166
}
167167
}
@@ -172,9 +172,8 @@ function Connection(options = {}) {
172172
ready = false
173173
}
174174

175-
function unknown() {
176-
// console.log('Unknown Message', x[0])
177-
}
175+
/* c8 ignore next */
176+
return connection
178177
}
179178

180179
function postgresSocket(options, {

0 commit comments

Comments
 (0)