Skip to content

Commit efd2608

Browse files
committed
Use the extended handshake to enable protocol 4.2
1 parent 9894a29 commit efd2608

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/internal/protocol-handshaker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function newHandshakeBuffer () {
156156
handshakeBuffer.writeInt32(BOLT_MAGIC_PREAMBLE)
157157

158158
// proposed versions
159-
handshakeBuffer.writeInt32((3 << 8) | 4)
159+
handshakeBuffer.writeInt32((1 << 16) | (3 << 8) | 4)
160160
handshakeBuffer.writeInt32((1 << 8) | 4)
161161
handshakeBuffer.writeInt32(4)
162162
handshakeBuffer.writeInt32(3)

test/internal/connection-channel.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe('#integration ChannelConnection', () => {
123123
connection._negotiateProtocol()
124124

125125
const boltMagicPreamble = '60 60 b0 17'
126-
const protocolVersion4x3 = '00 00 03 04'
126+
const protocolVersion4x3 = '00 01 03 04'
127127
const protocolVersion4x1 = '00 00 01 04'
128128
const protocolVersion4x0 = '00 00 00 04'
129129
const protocolVersion3 = '00 00 00 03'

test/internal/protocol-handshaker.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('#unit ProtocolHandshaker', () => {
4444
expect(writtenBuffers.length).toEqual(1)
4545

4646
const boltMagicPreamble = '60 60 b0 17'
47-
const protocolVersion4x3 = '00 00 03 04'
47+
const protocolVersion4x3 = '00 01 03 04'
4848
const protocolVersion4x1 = '00 00 01 04'
4949
const protocolVersion4x0 = '00 00 00 04'
5050
const protocolVersion3 = '00 00 00 03'

0 commit comments

Comments
 (0)