Patch TCP server closing