fix new socket api bug