Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Fix deadlock in Stop function. #43

Merged
merged 1 commit into from
Apr 22, 2015
Merged

Fix deadlock in Stop function. #43

merged 1 commit into from
Apr 22, 2015

Conversation

chuckbjones
Copy link
Contributor

If Stop() is called before the interrupt channel is created in Serve(), it will block forever. This commit creates the interrupt channel in Stop() or Serve(), whichever comes first. It uses the same logic as StopChan(), and reuses StopChan's mutex for locking.

If Stop() is called before the interrupt channel is created in Serve(), it will block forever. This commit creates the interrupt channel in Stop() or Serve(), whichever comes first. It uses the same logic as StopChan(), and reuses StopChan's mutex for locking.
@tylerstillwater
Copy link
Owner

Nice catch! Thanks for the PR!!

tylerstillwater pushed a commit that referenced this pull request Apr 22, 2015
Fix deadlock in Stop function.
@tylerstillwater tylerstillwater merged commit 0c01122 into tylerstillwater:master Apr 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants