Skip to content

Commit fe91c7c

Browse files
committed
Pass empty string not undefined to sessionCallback
1 parent c040ebd commit fe91c7c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/pool.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ function completeConnectionRequest(config, getConnectionCb) {
6666
// Invoke tag fixup callback method if one has been specified and
6767
// the actual tag on the connection doesn't match the one
6868
// requested, or the connection is freshly created.
69+
let requestedTag = config.tag || "";
6970
if (typeof self.sessionCallback === 'function' &&
70-
(newSession || connInst.tag != config.tag)) {
71-
self.sessionCallback(connInst, config.tag,
71+
(newSession || connInst.tag != requestedTag)) {
72+
self.sessionCallback(connInst, requestedTag,
7273
function(err) {
7374
if (err) {
7475
connInst.close({drop: true}, function() {

0 commit comments

Comments
 (0)