Your runnable ends and all its data (including the socket) is removed and thus the connection is broken. I'm repeating this two times a month on average but I'll do it again -- you don't need threads for networking. Use signals and slots and handle everything in a single thread.
Bookmarks