The wsgi module uses "wfile = conn.makefile('wb', self.wbufsize)" to get a file-like API and then call wfile.writelines(lines) to write data. If a socket send() is a partial write, writelines() ...
SelectorSocketTransport (in asyncio.selector_events) implements both write and writelines, but only the first has handling for the case that the connection has already been lost. That in turn can lead ...