redding/sanford-protocol — pull request #14 by jcredding (2013-01-30 15:46:21+00:00)
Title: Raise custom error when a socket read stream is closed immediately

When a remote connection closes the socket before the protocol
can read anything, it would previously read off an empty string
and throw a protocol version error. This modifies reading from
the connection to instead throw a specific exception. This will
allow Sanford servers to detect this and handle it however they
like. This behavior is typical of a keep-alive check. It will
simply make sure it can bind and then close the connection.