Changeset 279 for binary-improvements/MapRendering/Web/Web.cs
- Timestamp:
- Jun 19, 2016, 1:52:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/Web.cs
r250 r279 20 20 public static int handlingCount = 0; 21 21 public static int currentHandlers = 0; 22 public static long totalHandlingTime = 0; 22 23 private string dataFolder; 23 24 private bool useStaticCache = false; … … 131 132 Interlocked.Increment (ref handlingCount); 132 133 Interlocked.Increment (ref currentHandlers); 134 MicroStopwatch msw = new MicroStopwatch (); 133 135 HttpListenerContext ctx = _listener.EndGetContext (result); 134 136 _listener.BeginGetContext (new AsyncCallback (HandleRequest), _listener); … … 136 138 HttpListenerRequest request = ctx.Request; 137 139 HttpListenerResponse response = ctx.Response; 140 response.SendChunked = false; 138 141 139 142 response.ProtocolVersion = new Version ("1.1"); … … 187 190 Log.Out ("Error in Web.HandleRequest(): " + e); 188 191 } finally { 189 if (ctx != null ) {192 if (ctx != null && !ctx.Response.SendChunked) { 190 193 ctx.Response.Close (); 191 194 } 195 msw.Stop (); 196 totalHandlingTime += msw.ElapsedMicroseconds; 197 Log.Out ("Web.HandleRequest(): Took {0} µs", msw.ElapsedMicroseconds); 192 198 Interlocked.Decrement (ref currentHandlers); 193 199 }
Note:
See TracChangeset
for help on using the changeset viewer.