aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-10-30 10:03:17 +0100
committerLoïc Hoguin <[email protected]>2018-10-30 10:03:17 +0100
commit871989eef53663285c165fdfb83a5918ebe00d41 (patch)
tree31c2c21d20ce54b561620dafa50d85270206708a /src/gun.erl
parentf6e61f47adc2645f2caa5fbd012161d8bcca7502 (diff)
downloadgun-871989eef53663285c165fdfb83a5918ebe00d41.tar.gz
gun-871989eef53663285c165fdfb83a5918ebe00d41.tar.bz2
gun-871989eef53663285c165fdfb83a5918ebe00d41.zip
Switch to cow_http2_machine for HTTP/2
A common state machine for Gun and Cowboy will be easier to maintain. This fixes numerous issues including some test failures that were hidden because the h2specd_SUITE was flawed. We temporarily depend on Cowlib master until a new version is released.
Diffstat (limited to 'src/gun.erl')
-rw-r--r--src/gun.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gun.erl b/src/gun.erl
index 1659ee3..16349e1 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -845,6 +845,9 @@ loop(State=#state{parent=Parent, owner=Owner, owner_ref=OwnerRef,
{system, From, Request} ->
sys:handle_system_msg(Request, From, Parent, ?MODULE, [],
{loop, State});
+ %% @todo HTTP/2 requires more timeouts than just the keepalive timeout.
+ %% We should have a timeout function in protocols that deal with
+ %% received timeouts. Currently the timeout messages are ignored.
{ws_upgrade, _, StreamRef, _, _} ->
Owner ! {gun_error, self(), StreamRef, {badstate,
"Websocket is only supported over HTTP/1.1."}},