return pointer to websocket
This commit is contained in:
@@ -36,7 +36,7 @@ type GamedayWebsocket struct {
|
||||
*websocket.Conn
|
||||
}
|
||||
|
||||
func NewGamedayWebsocket(gamePk string) (GamedayWebsocket, error) {
|
||||
func NewGamedayWebsocket(gamePk string) (*GamedayWebsocket, error) {
|
||||
ws := GamedayWebsocket{
|
||||
baseURL: url.URL{
|
||||
Scheme: "wss",
|
||||
@@ -45,7 +45,7 @@ func NewGamedayWebsocket(gamePk string) (GamedayWebsocket, error) {
|
||||
}
|
||||
|
||||
err := ws.init(gamePk)
|
||||
return ws, err
|
||||
return &ws, err
|
||||
}
|
||||
|
||||
func (g *GamedayWebsocket) init(gamePk string) error {
|
||||
|
||||
@@ -60,7 +60,7 @@ func newWebsocket(gamePk string) (*statsapi.GamedayWebsocket, <-chan error, erro
|
||||
ch := make(chan error)
|
||||
go ws.KeepAlive(10*time.Second, ch)
|
||||
|
||||
return &ws, ch, err
|
||||
return ws, ch, err
|
||||
}
|
||||
|
||||
func handleUnexpectedClose(gamePk string) (*statsapi.GamedayWebsocket, []byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user