mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
check received sequence number for gaps and duplicates
This commit is contained in:
@@ -183,6 +183,8 @@ namespace util
|
||||
std::stringstream ss;
|
||||
uint8_t buf[8192];
|
||||
size_t r = s->Receive (buf, 8192, 30); // 30 seconds
|
||||
if (!r && s->IsEstablished ()) // nothing received but connection is established
|
||||
r = s->Receive (buf, 8192, 30); // wait for another 30 secondd
|
||||
if (r) // we recieved data
|
||||
{
|
||||
ss << std::string ((char *)buf, r);
|
||||
|
||||
Reference in New Issue
Block a user