The proper way to do it would be to use the .BeginReceive and .EndReceieve methods on the socket. MSDN has an example
here[
^].
This way you avoid the use of threads and the issue you described above. Its a little more coding work but its worth it.