Skip to content

Commit

Permalink
Agent should fail on SocketNotFoundException #280 (#281)
Browse files Browse the repository at this point in the history
If there are no matching candidate because a configuration mistake then the agent should fail.
  • Loading branch information
Horcrux7 authored Oct 4, 2024
1 parent 63cddcd commit d08e5a5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/org/ice4j/ice/ConnectivityCheckClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ protected TransactionID startCheckForPair(
{
logger.trace("checking pair " + candidatePair.toRedactedString() + " tid " + tran);
}

return tran;
}
catch (NetAccessManager.SocketNotFoundException e)
{
logger.info("Could not start connectivity check: " + e.getMessage());
}
catch (Exception ex)
{
tran = null;

IceSocketWrapper stunSocket = localCandidate.getStunSocket(null);

if (stunSocket != null)
Expand All @@ -376,7 +376,7 @@ protected TransactionID startCheckForPair(
}
}

return tran;
return null;
}

/**
Expand Down Expand Up @@ -957,6 +957,10 @@ protected void run()
pairToCheck.setStateInProgress(transactionID);
}
}
if (pairToCheck.getState() == CandidatePairState.FAILED)
{
updateCheckListAndTimerStates(pairToCheck);
}
}
else
{
Expand Down

0 comments on commit d08e5a5

Please sign in to comment.