mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Throw RuntimeException at sendMessage.
Make sendMessage package scope to not be used from client code. Remove stacktrace print. The caller in NetworkNode would report a onSuccess in the future callback because we do not escalate the exception but only handle it inside handleException. Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
f90c4b8f6b
commit
43233db70c
1 changed files with 2 additions and 3 deletions
|
@ -220,8 +220,7 @@ public class Connection implements HasCapabilities, Runnable, MessageListener {
|
||||||
return capabilities;
|
return capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from various threads
|
void sendMessage(NetworkEnvelope networkEnvelope) {
|
||||||
public void sendMessage(NetworkEnvelope networkEnvelope) {
|
|
||||||
long ts = System.currentTimeMillis();
|
long ts = System.currentTimeMillis();
|
||||||
log.debug(">> Send networkEnvelope of type: {}", networkEnvelope.getClass().getSimpleName());
|
log.debug(">> Send networkEnvelope of type: {}", networkEnvelope.getClass().getSimpleName());
|
||||||
|
|
||||||
|
@ -264,6 +263,7 @@ public class Connection implements HasCapabilities, Runnable, MessageListener {
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
handleException(t);
|
handleException(t);
|
||||||
|
throw new RuntimeException(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,6 @@ public class Connection implements HasCapabilities, Runnable, MessageListener {
|
||||||
socket.toString(),
|
socket.toString(),
|
||||||
this.peersNodeAddressOptional,
|
this.peersNodeAddressOptional,
|
||||||
e.toString());
|
e.toString());
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
shutDown(closeConnectionReason);
|
shutDown(closeConnectionReason);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue