From 6c85e4be4f027e2e5fe25bc79910a09407a6e90c Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 8 Aug 2017 13:21:59 -0400 Subject: [PATCH] change server ping period to be less frequent no need to ping ws every 10 sec --- rpc/lib/server/handlers.go | 2 +- rpc/lib/test/integration_test.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/rpc/lib/server/handlers.go b/rpc/lib/server/handlers.go index b95f606c..78845c09 100644 --- a/rpc/lib/server/handlers.go +++ b/rpc/lib/server/handlers.go @@ -340,7 +340,7 @@ const ( writeChanCapacity = 1000 wsWriteWait = 30 * time.Second // each write times out after this. defaultWSPongWait = 30 * time.Second - defaultWSPingPeriod = 10 * time.Second + defaultWSPingPeriod = (defaultWSPongWait * 9) / 10 ) // a single websocket connection diff --git a/rpc/lib/test/integration_test.sh b/rpc/lib/test/integration_test.sh index ca15440c..7c23be7d 100755 --- a/rpc/lib/test/integration_test.sh +++ b/rpc/lib/test/integration_test.sh @@ -9,9 +9,6 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" # Change into that dir because we expect that. pushd "$DIR" -echo "==> Installing deps" -go get -v - echo "==> Building the server" go build -o rpcserver main.go