Fix client error when connected node is shutdown.
Fixed #553.