close dropped session later in event loop

This commit is contained in:
Jeff Becker 2019-08-01 08:33:54 -04:00
parent 4cfc3481dc
commit a9f524383a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -331,7 +331,10 @@ namespace llarp
if(!self->PutSession(session))
{
LogWarn("dropping inbound utp session from ", remote);
utp_close(arg->socket);
// close later
self->m_Logic->call_later(50, [=]() {
session->Close();
});
}
else
{