Merge pull request #756 from michael-loki/fix_deadlock_on_error

Fix a deadlock when link fails to establish
This commit is contained in:
michael-loki 2019-08-07 07:06:22 +01:00 committed by GitHub
commit d6f2a1954f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -192,7 +192,7 @@ namespace llarp
const RouterContact &rc)
{
{
util::Lock l(&_mutex);
util::ReleasableLock l(&_mutex);
// in case other request found RC for this router after this request was
// made
@ -206,6 +206,7 @@ namespace llarp
if(!link)
{
l.Release();
FinalizeRequest(router, SessionResult::NoLink);
return;
}