title: ASP Push Notifications: limit time response
body: <p>I'm developing a .NET application which communicate with a JS client through Event-source.</p>
  
  <p>It's works pretty well but I have a problem:</p>
  
  <p>If a client disconnects when the server is writing, the server keeps being stuck for 10 seconds and gives me an error at the end: </p>
  
  <pre><code>The remote host closed the connection. The error code is 0x80070079.
  </code></pre>
  
  <p>This error is normal and I catch it, but I would like to avoid the  10 seconds or at least limit it to 1 or 2 seconds.</p>
  
  <p>My code is like this:</p>
  
  <pre><code> if (ctx.Response.IsClientConnected)
   {
        ctx.Response.Write("data: " + e.json + "\n\n");
   }
  </code></pre>
  
  <p>I try with <code>&lt;httpRuntime executionTimeout="3"/&gt;</code> but it doesn't work...</p>
  
  <p>Any idea?</p>
  
  <p>Valentin :)</p>