Close the socket on the end of the programm but not wait the end of the thread yet