Hello,
When you create the FRunnable thread, also pass a TFunction pointer to it, which will be called if the TCP connection fails. Then fire that function, through an AsyncTask on the GameThread. Move the widget creation logic in that function. This will make sure, that the widgets are created on the Main thread, while keeping your logic intact on your worker thread.