add connect timeout and socket timeout(all default are 2s).