From bfa9c10af706b1cc24c1feda0c51e2a7829184e1 Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 12 Apr 2018 22:14:11 +0900 Subject: [PATCH] ing --- connection-handler.go | 7 ------- readwrite-handler.go | 4 ---- socket/client-conn-handler.go | 2 -- socket/readwrite-handler.go | 7 +------ 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/connection-handler.go b/connection-handler.go index 9f5d2fe..77ca30b 100644 --- a/connection-handler.go +++ b/connection-handler.go @@ -66,21 +66,14 @@ func (ch *ConnectionHandlers) Clone() *ConnectionHandlers { func (ch *ConnectionHandlers) Validate() error { if ch.Concurrency <= 0 { ch.Concurrency = DefaultConcurrency - } else { - } if ch.KeepAlive <= 0 { ch.KeepAlive = DefaultKeepAlive - } else { - ch.KeepAlive = ch.KeepAlive * time.Second } if ch.HandshakeTimeout <= 0 { ch.HandshakeTimeout = DefaultHandshakeTimeout - } else { - ch.HandshakeTimeout = ch.HandshakeTimeout * time.Second } - return nil } diff --git a/readwrite-handler.go b/readwrite-handler.go index 16ac929..3b700ba 100644 --- a/readwrite-handler.go +++ b/readwrite-handler.go @@ -78,13 +78,9 @@ func (rwh *ReadWriteHandlers) Validate() error { } if rwh.ReadTimeout <= 0 { rwh.ReadTimeout = DefaultReadTimeout - } else { - rwh.ReadTimeout = rwh.ReadTimeout * time.Second } if rwh.WriteTimeout <= 0 { rwh.WriteTimeout = DefaultWriteTimeout - } else { - rwh.WriteTimeout = rwh.WriteTimeout * time.Second } return nil diff --git a/socket/client-conn-handler.go b/socket/client-conn-handler.go index b862bbe..1ae18f3 100644 --- a/socket/client-conn-handler.go +++ b/socket/client-conn-handler.go @@ -43,8 +43,6 @@ func (cch *ClientConnHandlers) Validate() error { if cch.ReconnectInterval <= 0 { cch.ReconnectInterval = server.DefaultReconnectInterval - } else { - cch.ReconnectInterval = cch.ReconnectInterval * time.Second } if cch.ReconnectTryTime <= 0 { diff --git a/socket/readwrite-handler.go b/socket/readwrite-handler.go index cc96c17..7684d90 100644 --- a/socket/readwrite-handler.go +++ b/socket/readwrite-handler.go @@ -55,18 +55,13 @@ func (rwh *ReadWriteHandlers) Validate() error { if rwh.PongTimeout <= 0 { rwh.PongTimeout = server.DefaultPongTimeout - } else { - rwh.PongTimeout = rwh.PongTimeout * time.Second } + if rwh.PingTimeout <= 0 { rwh.PingTimeout = server.DefaultPingTimeout - } else { - rwh.PingTimeout = rwh.PingTimeout * time.Second } if rwh.PingPeriod <= 0 { rwh.PingPeriod = (rwh.PingTimeout * 9) / 10 - } else { - rwh.PingPeriod = rwh.PingPeriod * time.Second } return nil