aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_ws.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-08-06 09:32:32 +0200
committerLoïc Hoguin <[email protected]>2018-08-06 09:32:32 +0200
commit7ee67df066af3d38fdb78aa396a6c3dd923ed107 (patch)
treed8f722f268321b90dfef0e8ddf73773a3e113fea /src/cow_ws.erl
parentd037ef2e6f35e998e528649195e0369441129a7f (diff)
downloadcowlib-7ee67df066af3d38fdb78aa396a6c3dd923ed107.tar.gz
cowlib-7ee67df066af3d38fdb78aa396a6c3dd923ed107.tar.bz2
cowlib-7ee67df066af3d38fdb78aa396a6c3dd923ed107.zip
Fix typespecs causing Dialyzer errors in user projects
Diffstat (limited to 'src/cow_ws.erl')
-rw-r--r--src/cow_ws.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cow_ws.erl b/src/cow_ws.erl
index 3d3807f..bac8450 100644
--- a/src/cow_ws.erl
+++ b/src/cow_ws.erl
@@ -349,7 +349,11 @@ frag_state(_, 1, _, FragState) -> FragState.
-spec parse_payload(binary(), mask_key(), utf8_state(), non_neg_integer(),
frame_type(), non_neg_integer(), frag_state(), extensions(), rsv())
- -> {ok, binary(), utf8_state(), binary()} | {more, binary(), utf8_state()} | error.
+ -> {ok, binary(), utf8_state(), binary()}
+ | {ok, close_code(), binary(), utf8_state(), binary()}
+ | {more, binary(), utf8_state()}
+ | {more, close_code(), binary(), utf8_state()}
+ | {error, badframe | badencoding}.
%% Empty last frame of compressed message.
parse_payload(Data, _, Utf8State, _, _, 0, {fin, _, << 1:1, 0:2 >>},
#{inflate := Inflate, inflate_takeover := TakeOver}, _) ->