github vapor/vapor 4.76.4
Fixed drain handler call order in case of asynchronous buffer handling

latest releases: 4.106.3, 4.106.2, 4.106.1...
17 months ago
This patch was authored by @salpieiev and released by @0xTim.

During request body drain each chunk of data may be handled asynchronously. This may lead to a call of handler with .end parameter before previous call with .buffer(buffer) finished it's execution.

For example:

  1. Open new file descriptor
  2. During .collected stage write ByteBuffer on disc using this file descriptor
  3. During .end stage close file descriptor

This fix ensures that file descriptor won't be closed until disc write completes

Don't miss a new vapor release

NewReleases is sending notifications on new releases.