0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00
This commit is contained in:
Loïc Hoguin 2012-03-23 01:26:47 +01:00
commit 7b2793b344

View file

@ -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.