Fixed blocking of caller code by moving sicket connect to the read thread.