mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
Detect null stream on I2PConnect
This commit is contained in:
parent
2fca028161
commit
634718d6b4
@@ -1,3 +1,4 @@
|
|||||||
|
#include <cassert>
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "Destination.h"
|
#include "Destination.h"
|
||||||
@@ -35,11 +36,14 @@ namespace client
|
|||||||
}
|
}
|
||||||
|
|
||||||
void I2PTunnelConnection::I2PConnect (const uint8_t * msg, size_t len)
|
void I2PTunnelConnection::I2PConnect (const uint8_t * msg, size_t len)
|
||||||
|
{
|
||||||
|
if (m_Stream)
|
||||||
{
|
{
|
||||||
if (msg)
|
if (msg)
|
||||||
m_Stream->Send (msg, len); // connect and send
|
m_Stream->Send (msg, len); // connect and send
|
||||||
else
|
else
|
||||||
m_Stream->Send (m_Buffer, 0); // connect
|
m_Stream->Send (m_Buffer, 0); // connect
|
||||||
|
}
|
||||||
StreamReceive ();
|
StreamReceive ();
|
||||||
Receive ();
|
Receive ();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user