Skip to content

Commit

Permalink
don't catch and rethrow the inner SAMException, that should happen au…
Browse files Browse the repository at this point in the history
…tomatically and it is redundant.
  • Loading branch information
eyedeekay committed May 3, 2022
1 parent 6368986 commit 1039931
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apps/sam/java/src/net/i2p/sam/SAMHandlerFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,9 @@ public static SAMHandler createSAMHandler(SocketChannel s, Properties i2cpProps,
}

if (secureSession != null) {
try {
boolean approval = secureSession.approveOrDenySecureSession(i2cpProps, props);
if (!approval) {
throw new SAMException("SAM connection cancelled by user request");
}
} catch (SAMException e) {
throw e;
boolean approval = secureSession.approveOrDenySecureSession(i2cpProps, props);
if (!approval) {
throw new SAMException("SAM connection cancelled by user request");
}
}

Expand Down

0 comments on commit 1039931

Please sign in to comment.