aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-09-02 18:45:39 +0200
committerLoïc Hoguin <[email protected]>2013-09-02 18:45:39 +0200
commit6f070d80c0fb6ff6197b2f8e3d5eb6d38e469c14 (patch)
tree79ecf76f1da4208cc9a6b5afe3a21f8be08cafc8 /src
parentb086ccfb7594e61c7a85241745b5329999053449 (diff)
downloadcowlib-6f070d80c0fb6ff6197b2f8e3d5eb6d38e469c14.tar.gz
cowlib-6f070d80c0fb6ff6197b2f8e3d5eb6d38e469c14.tar.bz2
cowlib-6f070d80c0fb6ff6197b2f8e3d5eb6d38e469c14.zip
Don't return unecessary data when split failed
Diffstat (limited to 'src')
-rw-r--r--src/cow_spdy.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cow_spdy.erl b/src/cow_spdy.erl
index 2dc1027..59036ee 100644
--- a/src/cow_spdy.erl
+++ b/src/cow_spdy.erl
@@ -55,8 +55,8 @@ split(Data = << _:40, Length:24, _/bits >>)
Length2 = Length + 8,
<< Frame:Length2/binary, Rest/bits >> = Data,
{true, Frame, Rest};
-split(Data) ->
- {false, Data}.
+split(_) ->
+ false.
parse(<< 0:1, StreamID:31, 0:7, IsFinFlag:1, _:24, Data/bits >>, _) ->
{data, StreamID, from_flag(IsFinFlag), Data};