ensure propagating the error condition if a connection is closed prematurely