From 00c1936683739d3d7d66c63240842d7775500c43 Mon Sep 17 00:00:00 2001 From: Maxim Merzhanov Date: Mon, 18 Nov 2019 19:08:29 +0300 Subject: [PATCH] try cmux.HTTP1Fast() --- config_service_integration_test.go | 3 ++- main.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config_service_integration_test.go b/config_service_integration_test.go index c926888..9192901 100644 --- a/config_service_integration_test.go +++ b/config_service_integration_test.go @@ -139,6 +139,7 @@ func TestClusterElection(t *testing.T) { testClusterReady(a, -1) + var ready bool for i := 0; i < configsNumber; i++ { fmt.Println() log.Printf("stopping %d container\n", i) @@ -147,7 +148,7 @@ func TestClusterElection(t *testing.T) { time.Sleep(9 * time.Second) fmt.Println() log.Printf("checking cluster except %d\n", i) - ready := testClusterReady(a, i) + ready = testClusterReady(a, i) if !ready { return } diff --git a/main.go b/main.go index c2437ad..e3a1090 100644 --- a/main.go +++ b/main.go @@ -100,7 +100,7 @@ func initMultiplexer(addressConfiguration structure.AddressConfiguration) (net.L } m := cmux.New(tcpListener) - httpListener := m.Match(cmux.HTTP1()) + httpListener := m.Match(cmux.HTTP1Fast()) raftListener := m.Match(cmux.Any()) go func() {