Skip to content

Commit 2267558

Browse files
authored
Merge pull request #101 from restatedev/pr101
Handle the `MAX_CONCURRENT_STREAMS` env var
2 parents 844d864 + 5a8c6ac commit 2267558

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test-services/entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
PORT=${PORT:-"9080"}
44

5+
if [ -n "$MAX_CONCURRENT_STREAMS" ]; then
6+
# respect the MAX_CONCURRENT_STREAMS environment variable
7+
awk 'BEGIN { FS=OFS="=" } $1=="h2_max_concurrent_streams " {$2=" '$MAX_CONCURRENT_STREAMS'"} {print}' hypercorn-config.toml > hypercorn-config.toml.new
8+
mv hypercorn-config.toml.new hypercorn-config.toml
9+
fi
10+
511
python3 -m hypercorn testservices:app --config hypercorn-config.toml --bind "0.0.0.0:${PORT}"

0 commit comments

Comments
 (0)