Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unlink before stopping a linked couch_event listener
Because `stop/1` is asynchronous, it only casts a stop message and as result the client process could end getting killed during termination/cleanup phase if this sequence of events took place: 1. Client calls `stop(ListerPid).` 2. couch_event_sup casts a `stop` message to couch_event_sup gen_server 3. `stop` message is delayed and client continues executing. 4. Client calls something like application:stop/1`. 5. `application:stop/1`couch_replicator) terminates couch_event_sup gen_server. 6. Termination of the application kills client process because it is still linked Issue apache#644
- Loading branch information