mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 22:57:52 +00:00
pass data for streams only
This commit is contained in:
parent
1a0abfbc06
commit
ca3b9f253d
3
SAM.cpp
3
SAM.cpp
@ -490,7 +490,7 @@ namespace client
|
|||||||
void SAMSocket::Receive ()
|
void SAMSocket::Receive ()
|
||||||
{
|
{
|
||||||
m_Socket.async_read_some (boost::asio::buffer(m_Buffer, SAM_SOCKET_BUFFER_SIZE),
|
m_Socket.async_read_some (boost::asio::buffer(m_Buffer, SAM_SOCKET_BUFFER_SIZE),
|
||||||
std::bind((m_SocketType == eSAMSocketTypeSession) ? &SAMSocket::HandleMessage : &SAMSocket::HandleReceived,
|
std::bind((m_SocketType == eSAMSocketTypeStream) ? &SAMSocket::HandleReceived : &SAMSocket::HandleMessage,
|
||||||
shared_from_this (), std::placeholders::_1, std::placeholders::_2));
|
shared_from_this (), std::placeholders::_1, std::placeholders::_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,6 +556,7 @@ namespace client
|
|||||||
auto session = m_Owner.FindSession (m_ID);
|
auto session = m_Owner.FindSession (m_ID);
|
||||||
if (session)
|
if (session)
|
||||||
session->localDestination->StopAcceptingStreams ();
|
session->localDestination->StopAcceptingStreams ();
|
||||||
|
m_SocketType = eSAMSocketTypeStream;
|
||||||
if (!m_IsSilent)
|
if (!m_IsSilent)
|
||||||
{
|
{
|
||||||
// send remote peer address
|
// send remote peer address
|
||||||
|
Loading…
Reference in New Issue
Block a user