Fixed bug: Dead lock when connect timeout