fix socket that must be closed