bugfix: Correctly raise EofError when the connection was unexpectedly closed (happens on Windows)