Skip to content

Commit

Permalink
Fixes intelsdi-x#1521: Snaptel hang on task watch
Browse files Browse the repository at this point in the history
Removes the timeout from the rest client when using task watch. Because
the timeout isn't reset on each transfer of data having a timeout
causes the watch to eventually hang when set.
  • Loading branch information
croseborough committed Feb 27, 2017
1 parent 32a479f commit a45ef70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mgmt/rest/client/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func (c *Client) CreateTask(s *Schedule, wf *wmap.WorkflowMap, name string, dead
// interactive with Event and Done channels. An HTTP GET request retrieves tasks.
// StreamedTaskEvent returns if it succeeds. Otherwise, an error is returned.
func (c *Client) WatchTask(id string) *WatchTasksResult {
// during watch we don't want to have a timeout
c.http.Timeout = time.Duration(0)

r := &WatchTasksResult{
EventChan: make(chan *rbody.StreamedTaskEvent),
DoneChan: make(chan struct{}),
Expand Down

0 comments on commit a45ef70

Please sign in to comment.