- fix to close socket