-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preinitialize
workCancel
function in case StopAndCancel
called be…
…fore start (#557) This one's related to #549. Although the most proximate problem in that repro code is that there was no error check when calling `Start`, it did reveal a legitimate problem in that the River client will panic in case `StopAndCancel` is called before `Start` because `workCancel` was never set. Here, initialize `workCancel` in the client's constructor. During normal operation this will be overwritten almost immediately on `Start` as the client starts up, but in case `Start` was never called or didn't run successfully, it provides a function for `StopAndCancel` to call so that it doesn't panic. Fixes #549.
- Loading branch information
Showing
3 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters