fix socket hang up