Don't try to reconnect if the connection was closed cleanly.

This commit is contained in:
akwizgran
2020-05-25 17:15:00 +01:00
parent 35d1b406f7
commit 6eb77465f6
8 changed files with 116 additions and 55 deletions

View File

@@ -47,7 +47,7 @@ public interface ConnectionRegistry {
* the contact.
*/
void unregisterConnection(ContactId c, TransportId t,
InterruptibleConnection conn, boolean incoming);
InterruptibleConnection conn, boolean incoming, boolean exception);
/**
* Sets the {@link Priority priority} of a connection that was previously

View File

@@ -13,13 +13,14 @@ public class ConnectionClosedEvent extends Event {
private final ContactId contactId;
private final TransportId transportId;
private final boolean incoming;
private final boolean incoming, exception;
public ConnectionClosedEvent(ContactId contactId, TransportId transportId,
boolean incoming) {
boolean incoming, boolean exception) {
this.contactId = contactId;
this.transportId = transportId;
this.incoming = incoming;
this.exception = exception;
}
public ContactId getContactId() {
@@ -33,4 +34,8 @@ public class ConnectionClosedEvent extends Event {
public boolean isIncoming() {
return incoming;
}
public boolean isException() {
return exception;
}
}