Subject: | Rethink the design of "Spurious read" errors |
A poorly-behaved server might send bytes down an "idle" TCP socket, upsetting the client logic in NaHTTP. Currently this causes a loop-level exception that in its default unhandled state is fatal to the program.
We probably want a nicer way to handle this, perhaps by printing it as simply a warning and closing the socket. The circumstances of the failure (an idle connection) mean that there isn't an easy way to throw that error into a pending Future or similar.
--
Paul Evans