mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Put objectInputStream.available() inside try clause
This commit is contained in:
parent
594c5abf93
commit
577b027b51
1 changed files with 9 additions and 9 deletions
|
@ -711,16 +711,16 @@ public class Connection implements MessageListener {
|
|||
Thread.currentThread().setName("InputHandler-" + sharedModel.connection.getPeersNodeAddressOptional().get().getFullAddress());
|
||||
threadNameSet = true;
|
||||
}
|
||||
|
||||
if (objectInputStream.available() < 0) {
|
||||
log.warn("Shutdown because objectInputStream.available() < 0. objectInputStream.available()=" + objectInputStream.available());
|
||||
sharedModel.shutDown(CloseConnectionReason.TERMINATED);
|
||||
return;
|
||||
}
|
||||
|
||||
Connection connection = sharedModel.connection;
|
||||
log.trace("InputHandler waiting for incoming messages.\n\tConnection=" + connection);
|
||||
try {
|
||||
if (objectInputStream.available() < 0) {
|
||||
log.warn("Shutdown because objectInputStream.available() < 0. objectInputStream.available()=" + objectInputStream.available());
|
||||
sharedModel.shutDown(CloseConnectionReason.TERMINATED);
|
||||
return;
|
||||
}
|
||||
|
||||
Connection connection = sharedModel.connection;
|
||||
log.trace("InputHandler waiting for incoming messages.\n\tConnection=" + connection);
|
||||
|
||||
Object rawInputObject = objectInputStream.readObject();
|
||||
|
||||
// Throttle inbound messages
|
||||
|
|
Loading…
Add table
Reference in a new issue