Survive lost executor

Slightly ugly.

There is still some lack of thread safety in the server-side loop.