mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-03 05:57:21 +00:00
Payment channels: Make the ProtobufParser timer daemon and labelled.
This commit is contained in:
@@ -16,15 +16,15 @@
|
|||||||
|
|
||||||
package com.google.bitcoin.protocols.niowrapper;
|
package com.google.bitcoin.protocols.niowrapper;
|
||||||
|
|
||||||
|
import com.google.bitcoin.core.Utils;
|
||||||
|
import com.google.protobuf.ByteString;
|
||||||
|
import com.google.protobuf.MessageLite;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import com.google.bitcoin.core.Utils;
|
|
||||||
import com.google.protobuf.ByteString;
|
|
||||||
import com.google.protobuf.MessageLite;
|
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static com.google.common.base.Preconditions.checkState;
|
import static com.google.common.base.Preconditions.checkState;
|
||||||
|
|
||||||
@@ -72,8 +72,8 @@ public class ProtobufParser<MessageType extends MessageLite> {
|
|||||||
private TimerTask timeoutTask;
|
private TimerTask timeoutTask;
|
||||||
private long timeoutMillis;
|
private long timeoutMillis;
|
||||||
|
|
||||||
// A timer which manages expiring channels as their timeouts occur
|
// A timer which manages expiring connections as their timeouts occur (if configured).
|
||||||
private static final Timer timeoutTimer = new Timer();
|
private static final Timer timeoutTimer = new Timer("ProtobufParser timeouts", true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new protobuf handler.
|
* Creates a new protobuf handler.
|
||||||
|
|||||||
Reference in New Issue
Block a user