1.Fix a bug about socket handler, when ftp upgrade, failed.