add connect timeout & reply http error message & fix thread safe bug