fix leaking socket desc while try to reconnect to a controller

Reviewer: @kenchiang