Can now shutdown selector, socket and thread.