style and close socket after assert