From 35d9f47fbcff23395c256b7814ce6af1d85129a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 26 Aug 2020 17:19:29 +0200 Subject: Add a gun:stream_ref() type and fix Dialyzer --- src/gun_http.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gun_http.erl') diff --git a/src/gun_http.erl b/src/gun_http.erl index 2536369..490f025 100644 --- a/src/gun_http.erl +++ b/src/gun_http.erl @@ -41,10 +41,10 @@ -type io() :: head | {body, non_neg_integer()} | body_close | body_chunked | body_trailer. %% @todo Make that a record. --type connect_info() :: {connect, reference(), gun:connect_destination()}. +-type connect_info() :: {connect, gun:stream_ref(), gun:connect_destination()}. -record(websocket, { - ref :: reference(), + ref :: gun:stream_ref(), reply_to :: pid(), key :: binary(), extensions :: [binary()], @@ -52,7 +52,7 @@ }). -record(stream, { - ref :: reference() | connect_info() | #websocket{}, + ref :: gun:stream_ref() | connect_info() | #websocket{}, reply_to :: pid(), flow :: integer() | infinity, method :: binary(), @@ -75,7 +75,7 @@ %% Base stream ref, defined when the protocol runs %% inside an HTTP/2 CONNECT stream. - base_stream_ref = undefined :: undefined | reference() | [reference()], + base_stream_ref = undefined :: undefined | gun:stream_ref(), streams = [] :: [#stream{}], in = head :: io(), -- cgit v1.2.3