From 7bf33cff210f9104c0a2078140ec1d2fd58600cf Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 25 Aug 2017 15:10:00 +0900 Subject: [PATCH] ing --- client.go | 3 +-- server.go | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 2977c6a..52f3271 100644 --- a/client.go +++ b/client.go @@ -14,6 +14,7 @@ type Client interface { ID() string Conn() *websocket.Conn Path() string + run() } type client struct { @@ -34,8 +35,6 @@ func NewClient(id string, path string, o *ClientOptions, conn *websocket.Conn) C messageType: websocket.TextMessage, } - go c.run() - return c } diff --git a/server.go b/server.go index 62aa4a0..a0d173c 100644 --- a/server.go +++ b/server.go @@ -80,6 +80,8 @@ func (s *server) onConnection(ctx *fasthttp.RequestCtx) { s._cMtx.Unlock() s._option.OnConnection(c) + + c.run() }) }