- If we're done before the client sends a FIN, force a FIN into the raw
SocketInput so the task in FileteredStreamAdapter finishes gracefully
and we dispose everything in proper order.
- If there's an error while writing to a stream (like ObjectDisposedException),
log it once and prevent further write attempts. This means the client closed
the connection while we were still writing output.
- This also fixes a bug related to the point above, where memory blocks were
being leaked instead of returned to the pool (because we weren't catching
the exception from Write()).
- This is a delayed reaction to 54caf30 which causes connections closed from
the server to be closed less gracefully due to no longer waiting for a FIN
from the client