File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,11 +239,11 @@ private static unsafe void WorkerLoop(Worker W)
239239 }
240240
241241 /// <summary>
242- /// Parses as many complete HTTP requests as are present in the receive buffer.
242+ /// Parses as many complete HTTP requests as are present in the receiving buffer.
243243 /// For each complete request:
244244 /// - extracts the route
245245 /// - invokes the configured request handler to stage a response into WriteBuffer
246- /// The receive window is compacted when partial data remains.
246+ /// The receiving window is compacted when partial data remains.
247247 /// Returns true if any response data was staged and should be flushed.
248248 /// </summary>
249249 private static async ValueTask TryParseRequests (
@@ -275,6 +275,7 @@ private static async ValueTask TryParseRequests(
275275 await _sRequestHandler ( connection ) ;
276276
277277 // Clear pooled dictionaries (query parameters + headers)
278+ // Currently Clear won't reset the buffers, if it changes, adapt here too
278279 connection . Clear ( ) ;
279280
280281 // Mark that there is data to flush (a request was fully processed)
Original file line number Diff line number Diff line change @@ -131,9 +131,23 @@ public bool IsUsed(int index)
131131
132132 public void Dispose ( )
133133 {
134- try { if ( Ep >= 0 ) close ( Ep ) ; } catch { /* log */ }
135- try { if ( NotifyEfd >= 0 ) close ( NotifyEfd ) ; } catch { /* log */ }
136- if ( EventsBuf != IntPtr . Zero ) Marshal . FreeHGlobal ( EventsBuf ) ;
134+ try
135+ {
136+ if ( Ep >= 0 )
137+ close ( Ep ) ;
138+
139+ } catch { /* log */ }
140+
141+ try
142+ {
143+ if ( NotifyEfd >= 0 )
144+ close ( NotifyEfd ) ;
145+
146+ } catch { /* log */ }
147+
148+ if ( EventsBuf != IntPtr . Zero )
149+ Marshal . FreeHGlobal ( EventsBuf ) ;
150+
137151 // Optionally GC.SuppressFinalize(this);
138152 }
139153}
You can’t perform that action at this time.
0 commit comments