Raise an exception if trying to write into closed response #2499
Closed
Description
See https://stackoverflow.com/questions/47175297/handling-premature-client-disconnection-in-aiohttp
The problem is: await drain() does nothing because the buffer is not overflown, the buffer is not overflown because sent data are ignored and not accumulated in internal buffer.
transport.is_closing() should be used for check.
It should be fixed in payload writer, affects both client and server.