twisted / ampoule

Process pool for Twisted, using AMP
Other
12 stars 19 forks source link

Fix a process leak. #27

Closed dreid closed 5 years ago

dreid commented 5 years ago

When a process exits non-zero ampoule tries to immediately replace it, this is a problem if the process exits non-zero when recycling because ampoule also tries to immediately replace the recycled process.

startWorker adds a callback that tries to replace the process. and recycling calls stopAWorker and adds a callback that tries to start a new process.

In the case where Shutdown causes a non-zero exit code this caused two startAWorker invocations for every recycled process.