Fix network connection problem when using new handler to initiate a new
task.