mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Add handling for INVALID_CLASS case
This commit is contained in:
parent
b2b66d42a8
commit
8d9e330916
2 changed files with 4 additions and 1 deletions
|
@ -24,7 +24,8 @@ public enum CloseConnectionReason {
|
|||
|
||||
// illegal requests
|
||||
RULE_VIOLATION(true, false),
|
||||
PEER_BANNED(true, false);
|
||||
PEER_BANNED(true, false),
|
||||
INVALID_CLASS_RECEIVED(false, false);
|
||||
|
||||
public final boolean sendCloseMessage;
|
||||
public boolean isIntended;
|
||||
|
|
|
@ -591,6 +591,8 @@ public class Connection implements MessageListener {
|
|||
if (ruleViolation == RuleViolation.PEER_BANNED) {
|
||||
log.warn("We detected a connection to a banned peer. We will close that connection. (reportInvalidRequest)");
|
||||
shutDown(CloseConnectionReason.PEER_BANNED);
|
||||
} else if (ruleViolation == RuleViolation.INVALID_CLASS) {
|
||||
shutDown(CloseConnectionReason.INVALID_CLASS_RECEIVED);
|
||||
} else {
|
||||
shutDown(CloseConnectionReason.RULE_VIOLATION);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue