Browse Source

No descriptors error

pull/1825/head
orignal 2 years ago
parent
commit
737603e81b
  1. 3
      daemon/HTTPServer.cpp
  2. 18
      libi2pd/NTCP2.cpp
  3. 3
      libi2pd/RouterContext.h

3
daemon/HTTPServer.cpp

@ -248,6 +248,9 @@ namespace http {
case eRouterErrorSymmetricNAT: case eRouterErrorSymmetricNAT:
s << " - " << tr("Symmetric NAT"); s << " - " << tr("Symmetric NAT");
break; break;
case eRouterErrorNoDescriptors:
s << " - " << tr("No Descriptors");
break;
default: ; default: ;
} }
} }

18
libi2pd/NTCP2.cpp

@ -1425,7 +1425,15 @@ namespace transport
LogPrint (eLogError, "NTCP2: Connected from error ", ec.message ()); LogPrint (eLogError, "NTCP2: Connected from error ", ec.message ());
} }
else else
{
LogPrint (eLogError, "NTCP2: Accept error ", error.message ()); LogPrint (eLogError, "NTCP2: Accept error ", error.message ());
if (error == boost::asio::error::no_descriptors)
{
i2p::context.SetError (eRouterErrorNoDescriptors);
// TODO
return;
}
}
if (error != boost::asio::error::operation_aborted) if (error != boost::asio::error::operation_aborted)
{ {
@ -1457,6 +1465,16 @@ namespace transport
else else
LogPrint (eLogError, "NTCP2: Connected from error ", ec.message ()); LogPrint (eLogError, "NTCP2: Connected from error ", ec.message ());
} }
else
{
LogPrint (eLogError, "NTCP2: Accept ipv6 error ", error.message ());
if (error == boost::asio::error::no_descriptors)
{
i2p::context.SetErrorV6 (eRouterErrorNoDescriptors);
// TODO
return;
}
}
if (error != boost::asio::error::operation_aborted) if (error != boost::asio::error::operation_aborted)
{ {

3
libi2pd/RouterContext.h

@ -47,7 +47,8 @@ namespace garlic
eRouterErrorNone = 0, eRouterErrorNone = 0,
eRouterErrorClockSkew = 1, eRouterErrorClockSkew = 1,
eRouterErrorOffline = 2, eRouterErrorOffline = 2,
eRouterErrorSymmetricNAT = 3 eRouterErrorSymmetricNAT = 3,
eRouterErrorNoDescriptors = 4
}; };
class RouterContext: public i2p::garlic::GarlicDestination class RouterContext: public i2p::garlic::GarlicDestination

Loading…
Cancel
Save