mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check received sequence number for gaps and duplicates
This commit is contained in:
parent
5b025909b6
commit
c762e41b05
2 changed files with 35 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue