[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

pfreixes report at bugs.python.org
Fri Jul 7 03:10:33 EDT 2017


pfreixes added the comment:

I think that we are not in the same page, the following snippet is a nodejs client that emulates the same:

var net = require('net');
var sleep = require('sleep');

var client = new net.Socket();
client.connect(6379, '127.0.0.1', function() {
    console.log('Connected');
    sleep.sleep(10); // wait for data and RST package
});

client.on('data', function(data) {
    console.log('Received: ' + data);
});

client.on('close', function() {
    console.log('Connection closed');
});

The client will be able to get the data, even taking into account that the RST package has been processed by the Operating System. Meanwhile, the same behavior with asyncio is unpredictable.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30861>
_______________________________________


More information about the Python-bugs-list mailing list