From d2580b27c1c13411f60b11878ce4386e14fa0892 Mon Sep 17 00:00:00 2001 From: IrineSistiana <49315432+IrineSistiana@users.noreply.github.com> Date: Sat, 15 Feb 2020 16:25:33 +0800 Subject: [PATCH] switch to smux version 1 and reduce smux io buffer size --- internal/core/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/core/config.go b/internal/core/config.go index 5fb5b56..d0531a2 100644 --- a/internal/core/config.go +++ b/internal/core/config.go @@ -27,11 +27,12 @@ import ( var ( defaultSmuxConfig = &smux.Config{ + Version: 1, KeepAliveInterval: 10 * time.Second, KeepAliveTimeout: 30 * time.Second, MaxFrameSize: 16 * 1024, - MaxReceiveBuffer: 2048 * 1024, - MaxStreamBuffer: 512 * 1024, + MaxReceiveBuffer: 256 * 1024, + MaxStreamBuffer: 64 * 1024, } )