From c0d0ce60ba43a25bc7a39841e571970f15f5cb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BE=B7=E6=BB=A1?= Date: Thu, 22 Apr 2021 22:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E9=95=BF=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=B6=88=E6=81=AF=E4=BD=93=E4=BB=A5=E5=8F=8A=E6=8E=A2?= =?UTF-8?q?=E6=B4=BB=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/server.go b/config/server.go index f0192dc..1096854 100644 --- a/config/server.go +++ b/config/server.go @@ -224,6 +224,9 @@ func NewWSServerConfig(optionList ...SetWSServerConfig) *WSServerConfig { } c.MaxMessageSize = DefaultMaxMessageSize c.MessageBufferSize = DefaultMaxMessageBufferSize + c.PingPeriod = time.Duration(DefaultPingPeriod) * time.Second + c.WriteWait = time.Duration(DefaultWriteWait) * time.Second + c.PongWait = time.Duration(DefaultPongWait) * time.Second for _, o := range optionList { o(c) }