Payment channels: Make the ProtobufParser timer daemon and labelled.

This commit is contained in:
Mike Hearn 2013-07-24 14:58:33 +02:00
parent 00bc4e30ee
commit 51d717e93a

View File

@ -16,15 +16,15 @@
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.ByteOrder;
import java.util.Timer;
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.checkState;
@ -72,8 +72,8 @@ public class ProtobufParser<MessageType extends MessageLite> {
private TimerTask timeoutTask;
private long timeoutMillis;
// A timer which manages expiring channels as their timeouts occur
private static final Timer timeoutTimer = new Timer();
// A timer which manages expiring connections as their timeouts occur (if configured).
private static final Timer timeoutTimer = new Timer("ProtobufParser timeouts", true);
/**
* Creates a new protobuf handler.