This commit is contained in:
crusader 2017-08-25 15:10:00 +09:00
parent 596532aa3c
commit 7bf33cff21
2 changed files with 3 additions and 2 deletions

View File

@ -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
}

View File

@ -80,6 +80,8 @@ func (s *server) onConnection(ctx *fasthttp.RequestCtx) {
s._cMtx.Unlock()
s._option.OnConnection(c)
c.run()
})
}