I think the disconnected signal gets messed up.
Move the connect statement from run right after you create the connection.
Just before you call setSocketDescriptor.

Regards.