[PATCH 4/4] server: Cancel dead threads' asyncs when closing the last socket handle in process.