Skip to content

Commit aa2b535

Browse files
Merge pull request esphome#10 from ESP32Async/issue-6
fix: Set ASYNCWEBSERVER_USE_CHUNK_INFLIGHT to 1 by default
2 parents f99decc + 16013ef commit aa2b535

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
- env: ci-arduino-3-no-json
110110
board: esp32dev
111111

112-
- env: ci-arduino-3-chunk-inflight
112+
- env: ci-arduino-3-no-chunk-inflight
113113
board: esp32dev
114114

115115
- env: ci-esp8266

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ I personally use the following configuration in my projects:
208208
-D CONFIG_ASYNC_TCP_STACK_SIZE=4096 // reduce the stack size (default is 16K)
209209
```
210210

211-
If you need to server long / slow requests using chunk encoding (like fiel download from SD Card), you might need to set `-D ASYNCWEBSERVER_USE_CHUNK_INFLIGHT=1`.
211+
If you need to serve chunk requests with a really low buffer (which should be avoided), you can set `-D ASYNCWEBSERVER_USE_CHUNK_INFLIGHT=0` to disable the in-flight control.
212212

213213
## `AsyncWebSocketMessageBuffer` and `makeBuffer()`
214214

platformio.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ lib_deps =
5050
; board = esp32-s3-devkitc-1
5151
; board = esp32-c6-devkitc-1
5252

53-
[env:arduino-3-chunk-inflight]
53+
[env:arduino-3-no-chunk-inflight]
5454
build_flags = ${env.build_flags}
55-
-D ASYNCWEBSERVER_USE_CHUNK_INFLIGHT=1
55+
-D ASYNCWEBSERVER_USE_CHUNK_INFLIGHT=0
5656

5757
[env:perf-test-AsyncTCP]
5858
build_flags = ${env.build_flags}
@@ -98,7 +98,7 @@ board = ${sysenv.PIO_BOARD}
9898
lib_deps =
9999
ESP32Async/AsyncTCP @ 3.3.2
100100

101-
[env:ci-arduino-3-chunk-inflight]
101+
[env:ci-arduino-3-no-chunk-inflight]
102102
board = ${sysenv.PIO_BOARD}
103103
build_flags = ${env.build_flags}
104104
-D ASYNCWEBSERVER_USE_CHUNK_INFLIGHT=1

src/ESPAsyncWebServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
// See https://github.com/ESP32Async/ESPAsyncWebServer/commit/3d3456e9e81502a477f6498c44d0691499dda8f9#diff-646b25b11691c11dce25529e3abce843f0ba4bd07ab75ec9eee7e72b06dbf13fR388-R392
6464
// This setting slowdown chunk serving but avoids crashing or deadlocks in the case where slow chunk responses are created, like file serving form SD Card
6565
#ifndef ASYNCWEBSERVER_USE_CHUNK_INFLIGHT
66-
#define ASYNCWEBSERVER_USE_CHUNK_INFLIGHT 0
66+
#define ASYNCWEBSERVER_USE_CHUNK_INFLIGHT 1
6767
#endif
6868

6969
class AsyncWebServer;

0 commit comments

Comments
 (0)