heroku/ranch_proxy_protocol — pull request #7 by ferd (2014-12-08 16:49:05+00:00)
Title: Prevent a nasty lockup when bad proxy data is sent

When bad/incomplete data is sent to the proxy protocol, ranch's
'infinity' timeout may cause the parser (with {packet, line}) to never
return. This in turn locks up the server and brings it down without ever
crashing it.

This fix makes it so that a configured timeout (now made much larger)
can be substituted in to replace the 'infinity' value whenever it is
submitted, working around the issue.