default_socket_timeout SoapClient php does not work

0

I'm trying to define a timeout limit in a call to a webservice, for this I'm using the command ini_set('default_socket_timeout', 2); but still waiting until the end of the server response. The documentation says that this is the line that should be used for slow requests because the option connection_timeout that is sent as a parameter when instantiating the SoapClient class is for the case that the service does not respond. I've tried both of them but he does not take them, he always waits until the service responds.

I do not understand why it does not take the time that I say, that is, I set it and I see that the value has been taken with the command ini_get('default_socket_timeout'); , but ignores it, it should throw an error to the two seconds but the script continues until the service responds.

I am grateful to anyone who can help me find what is missing or how I can make it work, if some configuration is missing or it can be done in a different way.

    
asked by Juan Carlos 24.04.2018 в 22:54
source

0 answers