clean socket snippet

Signed-off-by: waler-zheng <mykulou@gmail.com>