Establish connection in Thread to improve response time.