From 50c16bd03aecff1e7d2c287e49513247011ce8b2 Mon Sep 17 00:00:00 2001 From: Shargon Date: Wed, 12 Jun 2019 22:03:22 +0200 Subject: [PATCH] Const (#818) --- neo/Network/P2P/Connection.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/neo/Network/P2P/Connection.cs b/neo/Network/P2P/Connection.cs index b7a007ad62..d741f1d0ee 100644 --- a/neo/Network/P2P/Connection.cs +++ b/neo/Network/P2P/Connection.cs @@ -12,22 +12,22 @@ public abstract class Connection : UntypedActor internal class Timer { public static Timer Instance = new Timer(); } internal class Ack : Tcp.Event { public static Ack Instance = new Ack(); } - public IPEndPoint Remote { get; } - public IPEndPoint Local { get; } - - private ICancelable timer; - private readonly IActorRef tcp; - private readonly WebSocket ws; - private bool disconnected = false; /// /// connection initial timeout (in seconds) before any package has been accepted /// - private double connectionTimeoutLimitStart = 10; + private const int connectionTimeoutLimitStart = 10; /// /// connection timeout (in seconds) after every `OnReceived(ByteString data)` event /// - private double connectionTimeoutLimit = 60; + private const int connectionTimeoutLimit = 60; + public IPEndPoint Remote { get; } + public IPEndPoint Local { get; } + + private ICancelable timer; + private readonly IActorRef tcp; + private readonly WebSocket ws; + private bool disconnected = false; protected Connection(object connection, IPEndPoint remote, IPEndPoint local) { this.Remote = remote;