0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Use the proper typespec for the websocket_deflate_frame rsv bits

This commit is contained in:
Ali Sabil 2013-07-08 09:49:35 +02:00
parent 6f0b8804bc
commit c5c9c398ff

View file

@ -676,7 +676,7 @@ websocket_opcode(ping) -> 9;
websocket_opcode(pong) -> 10.
-spec websocket_deflate_frame(opcode(), binary(), #state{}) ->
{binary(), <<_:3>>, #state{}}.
{binary(), rsv(), #state{}}.
websocket_deflate_frame(Opcode, Payload,
State=#state{deflate_frame = DeflateFrame})
when DeflateFrame =:= false orelse Opcode >= 8 ->