Added auto-reconnect and socket timeout
Set 5 threads by default