title: socket doesn't close when thread done
body: <p>I have a problem with sockets. This:</p>
  
  <p><img src="https://i.stack.imgur.com/e8cI6.png" alt="enter image description here"></p>
  
  <p>When client-thread ends, server trying to read, and its freezes, because socket is not closed. Thread dont close it, when its over. Its problem exist, if i using thread, but if i using two independents projects, i have no problem (exception throws, and i can catch it). 
  I cant use timeout, and i must correct continue server-work, when client dont close socket.
  Sorry for my bad eng.</p>