packbackbooks / lti-1-3-php-library

A library used for building IMS-certified LTI 1.3 tool providers in PHP.
Apache License 2.0
39 stars 25 forks source link

DEV-11264: Add timeout to LtiServiceConnector #4

Closed cophaso closed 3 years ago

cophaso commented 3 years ago

Adds a 60 second timeout to curl request using CURLOPT_TIMEOUT

There seems to be different timeout types for curl. For example

  1. CURLOPT_CONNECTTIMEOUT: Number of seconds allotted for the request to connect to the server.
  2. CURLOPT_TIMEOUT: Number of seconds allotted for the entire request to finish.

~I chose 1 because it seems like that's where we wanted the timeout to happen, but if it's not happy to make the change.~ Chose 2 cause that's what Guzzle uses.

Test Pass: ![Screenshot from 2021-05-06 14-03-37](https://user-images.githubusercontent.com/8699045/117366276-5d05cd00-ae75-11eb-93cd-74ecac2b1270.png)