mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-19 19:01:22 +00:00
waiting and retrying clogged write channels
This commit is contained in:
parent
dbd900f74a
commit
44d26b513a
@ -31,7 +31,20 @@ public class ChannelWriteTask implements Task {
|
||||
@Override
|
||||
public void perform() throws InterruptedException {
|
||||
try {
|
||||
boolean isSocketClogged = peer.writeChannel();
|
||||
|
||||
boolean isSocketClogged;
|
||||
do {
|
||||
isSocketClogged = peer.writeChannel();
|
||||
|
||||
if (isSocketClogged) {
|
||||
LOGGER.info(
|
||||
"socket is clogged: peer = {} {}, retrying",
|
||||
peer.getPeerData().getAddress().toString(),
|
||||
Thread.currentThread().getName()
|
||||
);
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
} while( isSocketClogged );
|
||||
|
||||
// Tell Network that we've finished
|
||||
Network.getInstance().notifyChannelNotWriting(socketChannel);
|
||||
|
Loading…
x
Reference in New Issue
Block a user