Moved connecting into its own thread - and wrapped the ReadThread loop for TCP with some Exception handling for NullPointers and Socket Exceptions.