Skip to content

Commit

Permalink
do not timeout if API has not been initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
brobits committed Mar 7, 2018
1 parent 7cef4df commit 8dead57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/integration/v2/live_rest_test.go

This file was deleted.

5 changes: 5 additions & 0 deletions v2/websocket/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ type Client struct {
isConnected bool
terminal bool
resetSubscriptions []*subscription
init bool

// connection & operational behavior
parameters *Parameters
Expand Down Expand Up @@ -284,6 +285,7 @@ func (c *Client) reset() {
c.resetSubscriptions = subs
}
c.shutdown = make(chan bool)
c.init = true
c.asynchronous = c.asyncFactory.Create()
// wait for shutdown signals from child & caller
go c.listenDisconnect()
Expand Down Expand Up @@ -365,6 +367,9 @@ func (c *Client) close(e error) {
}

func (c *Client) closeAsyncAndWait(t time.Duration) {
if !c.init {
return
}
timeout := make(chan bool)
wg := sync.WaitGroup{}
wg.Add(1)
Expand Down

0 comments on commit 8dead57

Please sign in to comment.