From e6af223f0ddd3a372ca32ccd8ec6bbdbae3db225 Mon Sep 17 00:00:00 2001 From: Nicolas Dextraze Date: Tue, 17 Oct 2017 14:36:00 -0700 Subject: [PATCH] Fix identify client serialize --- src/core/eventStoreConnectionLogicHandler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/eventStoreConnectionLogicHandler.js b/src/core/eventStoreConnectionLogicHandler.js index 6bbd74f..0a1e489 100644 --- a/src/core/eventStoreConnectionLogicHandler.js +++ b/src/core/eventStoreConnectionLogicHandler.js @@ -10,6 +10,7 @@ var VolatileSubscriptionOperation = require('../clientOperations/volatileSubscri var ConnectToPersistentSubscriptionOperation = require('../clientOperations/connectToPersistentSubscriptionOperation'); var messages = require('./messages'); var ClientMessage = require('../messages/clientMessage'); +var createBufferSegment = require('../common/bufferSegment'); var TcpPackage = require('../systemData/tcpPackage'); var TcpCommand = require('../systemData/tcpCommand'); @@ -405,7 +406,8 @@ EventStoreConnectionLogicHandler.prototype._goToIdentifiedState = function() { timeStamp: Date.now() }; var dto = new ClientMessage.IdentifyClient({version: ClientVersion, connectionName: this._esConnection.connectionName}); - this._connection.enqueueSend(new TcpPackage(TcpCommand.IdentifyClient, this._identityInfo.correlationId, null, null, dto.serialize())) + var buf = dto.constructor.encode(dto).finish(); + this._connection.enqueueSend(new TcpPackage(TcpCommand.IdentifyClient, this._identityInfo.correlationId, null, null, createBufferSegment(buf))) }; EventStoreConnectionLogicHandler.prototype._goToConnectedState = function() {