There is a special case where the Capture and the Guide module get out of sync. As a result, PHD2 remains suspended while the Capture module continues capturing.
This happens, when a "star lost" event happens short before the Capture module issues a re-focussing. If the "star lost" timeout happens during the re-focussing, the Guiding module sends an "abort" to PHD2 while PHD2 is suspended. When the focussing succeeds, the Capture module sends a "resume()" event to the Guiding module. Here is where the problem comes: since PHD2 has its guiding aborted, it will remain in the "suspend" state and will not continue guiding.
This fix changes the behaviour of the PHD2 module. As soon as the PHD2 module receives a "suspend", it stops the "star lost" timer and restarts it as soon as the "resume" event is received.