handle err on socket after destroy