Reset socket handle variable after closesocket