when making a request, establish connection if it hasn't been done already