Thanks for the reply
yes I am checking the return codes and the program closes gracefully.

There is no crash, just the program closes on either side.
socket error param code = 10053 in the client side
Fails at WaitForMultipleObjects returns socket error as well.