From 284994d0d88635bdbdc79f08ed7e7a2da87f480a Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Wed, 6 Jun 2012 15:08:18 +0200 Subject: add timeouts diff --git a/ereproxy_server.erl b/ereproxy_server.erl index a6e9803..fbebe24 100644 --- a/ereproxy_server.erl +++ b/ereproxy_server.erl @@ -94,6 +94,8 @@ parse_header(MaxCache, Con = {TP, Sock}, OldData, CurrentLine, _RestData = <<>>) parse_header(MaxCache - size(Data), Con, OldData, CurrentLine, Data); {TP_Close, Sock} -> connection_closed + after 5000 -> + connection_timeout end; % parse: end of header (-> no Host-directive found) (two versions: LF/CRLF) @@ -133,4 +135,6 @@ pass_through(Cons, NumOpen) -> 1 -> ok end, ?MODULE:pass_through(Cons, NumOpen-1) + after 5000 -> + connection_timeout end. -- cgit v0.10.1