Added configurable timeout handling, and the ability to terminate the worker and reboot it by replaying the initialisation messages