Skip to content

Commit

Permalink
fix?: this shit throws IllegalStateException
Browse files Browse the repository at this point in the history
  • Loading branch information
ilotterytea committed Dec 31, 2024
1 parent e6e6aef commit 489527c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public Optional<Response> call(Request request) throws Exception {
}

if (request.getUserPermission().getLevel().getValue() < cmd.getPermissions().getValue() || isExecutedRecently) {
request.getSession().close();
return Optional.empty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public static void channelMessageEvent(ChannelMessageEvent e) {
});

if (userPermission.getLevel().getValue() == Permission.SUSPENDED.getValue()) {
session.getTransaction().commit();
session.close();
return;
}
Expand Down Expand Up @@ -176,7 +175,7 @@ public static void channelMessageEvent(ChannelMessageEvent e) {
LOG.error("An error occurred while executing the command {}", request.getMessage().getCommandId(), exception);
}

session.getTransaction().commit();
if (session.getTransaction().isActive()) session.getTransaction().commit();
session.close();
return;
}
Expand Down

0 comments on commit 489527c

Please sign in to comment.