title: Strange timeout behaviour using php soap client
body: <p>I'm trying to make a proxy-like page that forwards an AJAX request to a SOAP server.
  The browser sends 2 requests to the same page (i.e. server.php with different query string) every 10 seconds.
  The server makes a soap call to the soap server depending on the query string.
  All is working fine.</p>
  
  <p>Then I put a sleep (40 secs) in the soap server to simulate a slow response and I also put a timeout on the caller to abort the call after some seconds.</p>
  
  <pre><code>server.php: Pseudo code:
  
  $timeout = 10;
  ini_set("default_socket_timeout", $timeout);
  
  $id = $_GET['id'];
  
  $wsdl= 'http://soapserver/wsdl'
  $client = new SoapClient($wsdl,array('connection_timeout'=&gt; $timeout));
  print($client-&gt;getQuote($id));
  </code></pre>
  
  <p>If the browser sends an ajax request to <a href="http://myserver/server.php?id=IBM" rel="nofollow">http://myserver/server.php?id=IBM</a> 
  the request stops after the timeout I set. 
  If I try to make a second call before the first stops, the second one doesn't not respect timeout.</p>
  
  <pre><code>i.e.
  
  Request:
  
  GET http://myserver/server.php?id=IBM 
  and after 1 second 
  GET http://myserver/server.php?id=AAP
  
  Response:
  
  after 10 seconds:
  No data
  after 20 seconds:
  No data
  </code></pre>
  
  <p>I also tried to not use PHP SOAP and use curl instead but I got the same results.</p>
  
  <p>I also tried to open 3 tabs on my browser and call:</p>
  
  <pre><code>http://myserver/server.php?id=IBM
  http://myserver/server.php?id=AAP
  http://myserver/server.php?id=MSX
  </code></pre>
  
  <p>The first one stops after 10 seconds, the second after 20 seconds and the third after 30 seconds.</p>
  
  <p>Is this a normal behaviour or I miss something ?
  Thanks in advance</p>