bug fix:program exit when connection error