aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_static.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-04-11 23:14:27 +0200
committerLoïc Hoguin <[email protected]>2013-04-11 23:14:27 +0200
commit2a98ae05e3c45c8f7dc5eed2aa75d99bc38c84af (patch)
treea9fbba6dd381c1990d5555b4b4e1b90b01bcf2ed /src/cowboy_static.erl
parent23aa1314fc575d0992e7b9b0bb2cf9dc657ac708 (diff)
parent83876c3e33deaaa4c5fb99ff90b9d4bcaac91ade (diff)
downloadcowboy-2a98ae05e3c45c8f7dc5eed2aa75d99bc38c84af.tar.gz
cowboy-2a98ae05e3c45c8f7dc5eed2aa75d99bc38c84af.tar.bz2
cowboy-2a98ae05e3c45c8f7dc5eed2aa75d99bc38c84af.zip
Merge branch 'fix/sendfile-error-handling' of git://github.com/soundrop/cowboy
Diffstat (limited to 'src/cowboy_static.erl')
-rw-r--r--src/cowboy_static.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl
index d583fa9..fe6600c 100644
--- a/src/cowboy_static.erl
+++ b/src/cowboy_static.erl
@@ -324,7 +324,8 @@ file_contents(Req, #state{filepath=Filepath,
%% if the connection is closed while sending the file.
case Transport:sendfile(Socket, Filepath) of
{ok, _} -> ok;
- {error, closed} -> ok
+ {error, closed} -> ok;
+ {error, etimedout} -> ok
end
end,
{{stream, Filesize, Writefile}, Req, State}.