Browse Source

fix previous commit

pull/1169/head
Jeff Becker 7 years ago
parent
commit
5f525d0e43
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
  1. 5
      libi2pd_client/SAM.cpp

5
libi2pd_client/SAM.cpp

@ -60,7 +60,8 @@ namespace client
m_SocketType = eSAMSocketTypeTerminated; m_SocketType = eSAMSocketTypeTerminated;
if (m_Socket.is_open ()) if (m_Socket.is_open ())
{ {
m_Socket.shutdown (); boost::system::error_code ec;
m_Socket.shutdown (boost::asio::ip::tcp::socket::shutdown_both, ec);
m_Socket.close (); m_Socket.close ();
} }
m_Owner.RemoveSocket(this); m_Owner.RemoveSocket(this);
@ -749,7 +750,7 @@ namespace client
m_Socket, m_Socket,
boost::asio::buffer (m_StreamBuffer, sz), boost::asio::buffer (m_StreamBuffer, sz),
boost::asio::transfer_all(), boost::asio::transfer_all(),
std::bind(&SAMSocket::HandleWriteI2PData, shared_from_this(), std::placeholders::_1)); std::bind(&SAMSocket::HandleWriteI2PData, shared_from_this(), std::placeholders::_1, std::placeholders::_2));
} }
void SAMSocket::HandleI2PReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred) void SAMSocket::HandleI2PReceive (const boost::system::error_code& ecode, std::size_t bytes_transferred)

Loading…
Cancel
Save