mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
create io_service together with destination
This commit is contained in:
parent
f357a5864c
commit
e3f077ee9a
4 changed files with 27 additions and 73 deletions
|
@ -672,7 +672,7 @@ namespace stream
|
|||
|
||||
std::shared_ptr<Stream> StreamingDestination::CreateNewOutgoingStream (const i2p::data::LeaseSet& remote, int port)
|
||||
{
|
||||
auto s = std::make_shared<Stream> (*m_Owner.GetService (), *this, remote, port);
|
||||
auto s = std::make_shared<Stream> (m_Owner.GetService (), *this, remote, port);
|
||||
std::unique_lock<std::mutex> l(m_StreamsMutex);
|
||||
m_Streams[s->GetRecvStreamID ()] = s;
|
||||
return s;
|
||||
|
@ -680,7 +680,7 @@ namespace stream
|
|||
|
||||
std::shared_ptr<Stream> StreamingDestination::CreateNewIncomingStream ()
|
||||
{
|
||||
auto s = std::make_shared<Stream> (*m_Owner.GetService (), *this);
|
||||
auto s = std::make_shared<Stream> (m_Owner.GetService (), *this);
|
||||
std::unique_lock<std::mutex> l(m_StreamsMutex);
|
||||
m_Streams[s->GetRecvStreamID ()] = s;
|
||||
return s;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue