synopse / mORMot

Synopse mORMot 1 ORM/SOA/MVC framework - Please upgrade to mORMot 2 !
https://synopse.info
785 stars 324 forks source link

set a curl timeout as SendTimeout+ReceiveTimeout #404

Closed pavelmash closed 3 years ago

pavelmash commented 3 years ago

set a curl timeout as SendTimeout+ReceiveTimeout - this prevent request to wait forever; use *_TIMEOUT_MS (available in CURL since 2007year)

synopse commented 3 years ago

My guess is that the correct logic may be

   if SendTimeout < ReceiveTimeout then
    SendTimeout := ReceiveTimeout;
  if SendTimeout <> 0 then // prevent send+receive forever
    curl.easy_setopt(fHandle, coTimeoutMs, SendTimeout);
pavelmash commented 3 years ago

Ok, let it be as you propose max(SendTimeout, ReceiveTimeout) - I will investigate how it works in productions