neo4j-driver-bolt-connection
Advanced tools
Comparing version 5.10.0 to 5.11.0
@@ -51,3 +51,3 @@ "use strict"; | ||
} | ||
function parseNegotiatedResponse(buffer) { | ||
function parseNegotiatedResponse(buffer, log) { | ||
var h = [ | ||
@@ -60,2 +60,3 @@ buffer.readUInt8(), | ||
if (h[0] === 0x48 && h[1] === 0x54 && h[2] === 0x54 && h[3] === 0x50) { | ||
log.error('Handshake failed since server responded with HTTP.'); | ||
throw (0, neo4j_driver_core_1.newError)('Server responded HTTP. Make sure you are not trying to connect to the http endpoint ' + | ||
@@ -92,5 +93,6 @@ '(HTTP defaults to port 7474 whereas BOLT defaults to port 7687)'); | ||
* @param {Channel} channel the channel use to shake hands | ||
* @param {Logger} log the log object | ||
* @returns {Promise<HandshakeResult>} Promise of protocol version and consumeRemainingBuffer | ||
*/ | ||
function handshake(channel) { | ||
function handshake(channel, log) { | ||
var _this = this; | ||
@@ -108,3 +110,3 @@ return new Promise(function (resolve, reject) { | ||
// read the response buffer and initialize the protocol | ||
var protocolVersion = parseNegotiatedResponse(buffer); | ||
var protocolVersion = parseNegotiatedResponse(buffer, log); | ||
resolve({ | ||
@@ -111,0 +113,0 @@ protocolVersion: protocolVersion, |
@@ -96,3 +96,3 @@ "use strict"; | ||
var channel = createChannel(channelConfig); | ||
return bolt_1.default.handshake(channel) | ||
return bolt_1.default.handshake(channel, log) | ||
.then(function (_a) { | ||
@@ -99,0 +99,0 @@ var version = _a.protocolVersion, consumeRemainingBuffer = _a.consumeRemainingBuffer; |
{ | ||
"name": "neo4j-driver-bolt-connection", | ||
"version": "5.10.0", | ||
"version": "5.11.0", | ||
"description": "Implements the connection with the Neo4j Database using the Bolt Protocol", | ||
@@ -43,6 +43,6 @@ "main": "lib/index.js", | ||
"buffer": "^6.0.3", | ||
"neo4j-driver-core": "5.10.0", | ||
"neo4j-driver-core": "5.11.0", | ||
"string_decoder": "^1.3.0" | ||
}, | ||
"gitHead": "7198b57348b8490e350835f49051b62ac0ae9e95" | ||
"gitHead": "f20b9a86650000e8366b22e57520512909b5089f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
586841
12644
+ Addedneo4j-driver-core@5.11.0(transitive)
- Removedneo4j-driver-core@5.10.0(transitive)
Updatedneo4j-driver-core@5.11.0