Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/si14/cowboy
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Hoguin committed Mar 23, 2012
2 parents 7e74582 + 6e0b764 commit 7b2793b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cowboy_http_static.erl
Expand Up @@ -316,8 +316,10 @@ sfallback(Transport, Socket, File, Sent) ->
ok = file:close(File),
{sent, Sent};
{ok, Bin} ->
ok = Transport:send(Socket, Bin),
sfallback(Transport, Socket, File, Sent + byte_size(Bin))
case Transport:send(Socket, Bin) of
ok -> sfallback(Transport, Socket, File, Sent + byte_size(Bin));
{error, closed} -> {sent, Sent}
end
end.


Expand Down

0 comments on commit 7b2793b

Please sign in to comment.