Skip to content

Commit

Permalink
OF-2611: When Dialback fails, close the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Jul 20, 2023
1 parent 6974911 commit 2f8e17a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,13 @@ public LocalIncomingServerSession createIncomingSession(XMPPPacketReader reader)
// After the session has been created, inform all listeners as well.
ServerSessionEventDispatcher.dispatchEvent(session, ServerSessionEventDispatcher.EventType.session_created);
return session;
} catch (StreamErrorException e) {
Log.debug("ServerDialback: RS - Validation of remote domain for incoming session from {} to {} was not successful.", hostname, recipient, e);
connection.close(e.getStreamError());
return null;
} catch (Exception e) {
Log.debug("ServerDialback: RS - Validation of remote domain for incoming session from {} to {} was not successful.", hostname, recipient, e);
connection.close();
return null;
}
}
Expand Down

0 comments on commit 2f8e17a

Please sign in to comment.