From 7da694825d3cf86e1b33f7428ce3808c439aa11d Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 16 Dec 2014 19:04:13 -0500 Subject: [PATCH] fixed handshake --- SAM.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SAM.cpp b/SAM.cpp index 43711a54..860aadeb 100644 --- a/SAM.cpp +++ b/SAM.cpp @@ -116,7 +116,9 @@ namespace client #else size_t l = snprintf (m_Buffer, SAM_SOCKET_BUFFER_SIZE, SAM_HANDSHAKE_REPLY, version.c_str ()); #endif - SendMessageReply (m_Buffer, l, false); + boost::asio::async_write (m_Socket, boost::asio::buffer (m_Buffer, l), boost::asio::transfer_all (), + std::bind(&SAMSocket::HandleHandshakeReplySent, shared_from_this (), + std::placeholders::_1, std::placeholders::_2)); } else SendMessageReply (SAM_HANDSHAKE_I2P_ERROR, strlen (SAM_HANDSHAKE_I2P_ERROR), true);