fix reference sock after free it