Skip to content

Commit 38851e3

Browse files
authored
Fix handshake manifest parsing of future bolt versions (#1253)
1 parent d102ad3 commit 38851e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/bolt-connection/src/bolt/handshake.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { alloc } from '../channel'
1919
import { newError } from 'neo4j-driver-core'
2020

2121
const BOLT_MAGIC_PREAMBLE = 0x6060b017
22-
const AVAILABLE_BOLT_PROTOCOLS = [5.8, 5.7, 5.6, 5.4, 5.3, 5.2, 5.1, 5.0, 4.4, 4.3, 4.2, 3.0] // bolt protocols the client will accept, ordered by preference
22+
const AVAILABLE_BOLT_PROTOCOLS = ['5.8', '5.7', '5.6', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4', '4.3', '4.2', '3.0'] // bolt protocols the client will accept, ordered by preference
2323
const DESIRED_CAPABILITES = 0
2424

2525
function version (major, minor) {
@@ -98,7 +98,7 @@ function handshakeNegotiationV2 (channel, buffer, log) {
9898
})
9999
for (let i = 0; i < versions.length; i++) {
100100
const version = versions[i]
101-
if (AVAILABLE_BOLT_PROTOCOLS.includes(Number(version.major + '.' + version.minor))) {
101+
if (AVAILABLE_BOLT_PROTOCOLS.includes(version.major + '.' + version.minor)) {
102102
major = version.major
103103
minor = version.minor
104104
break

packages/neo4j-driver-deno/lib/bolt-connection/bolt/handshake.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)