When closing a socket, the proper way to close (socket buffer are cleared as well):
shut down both RX and TX.
clearing the buffer (looping socket receive till nothing is left)
closing the socket
that let the OS close Repro and run it on the same second the application is closed without getting "socket binding failure"
can add code if needed (fixed it)
changed it to major