3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 14:54:15 +00:00

Payment channels: Describe reason for connection closing in log message.

This commit is contained in:
Mike Hearn 2013-07-17 21:40:17 +02:00
parent c5d267f0f9
commit 87897fbb37

View File

@ -16,10 +16,6 @@
package com.google.bitcoin.protocols.channels; package com.google.bitcoin.protocols.channels;
import java.io.IOException;
import java.math.BigInteger;
import java.net.InetSocketAddress;
import com.google.bitcoin.core.ECKey; import com.google.bitcoin.core.ECKey;
import com.google.bitcoin.core.Sha256Hash; import com.google.bitcoin.core.Sha256Hash;
import com.google.bitcoin.core.Wallet; import com.google.bitcoin.core.Wallet;
@ -29,6 +25,10 @@ import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture; import com.google.common.util.concurrent.SettableFuture;
import org.bitcoin.paymentchannel.Protos; import org.bitcoin.paymentchannel.Protos;
import java.io.IOException;
import java.math.BigInteger;
import java.net.InetSocketAddress;
/** /**
* Manages a {@link PaymentChannelClientState} by connecting to a server over TLS and exchanging the necessary data over * Manages a {@link PaymentChannelClientState} by connecting to a server over TLS and exchanging the necessary data over
* protobufs. * protobufs.
@ -72,7 +72,7 @@ public class PaymentChannelClientConnection {
@Override @Override
public void destroyConnection(PaymentChannelCloseException.CloseReason reason) { public void destroyConnection(PaymentChannelCloseException.CloseReason reason) {
channelOpenFuture.setException(new PaymentChannelCloseException("Payment channel client requested that the connection be closed", reason)); channelOpenFuture.setException(new PaymentChannelCloseException("Payment channel client requested that the connection be closed: " + reason, reason));
wireParser.closeConnection(); wireParser.closeConnection();
} }