Родитель
896e19330a
Коммит
00efcb4cd7
|
@ -781,6 +781,7 @@ Socket.prototype.connect = function(options, cb) {
|
|||
if (this.destroyed) {
|
||||
this._readableState.reading = false;
|
||||
this._readableState.ended = false;
|
||||
this._readableState.endEmitted = false;
|
||||
this._writableState.ended = false;
|
||||
this._writableState.ending = false;
|
||||
this._writableState.finished = false;
|
||||
|
|
|
@ -27,6 +27,7 @@ var net = require('net');
|
|||
var N = 50;
|
||||
var c = 0;
|
||||
var client_recv_count = 0;
|
||||
var client_end_count = 0;
|
||||
var disconnect_count = 0;
|
||||
|
||||
var server = net.createServer(function(socket) {
|
||||
|
@ -67,6 +68,7 @@ server.listen(common.PORT, function() {
|
|||
|
||||
client.on('end', function() {
|
||||
console.error('CLIENT end');
|
||||
client_end_count++;
|
||||
});
|
||||
|
||||
client.on('close', function(had_error) {
|
||||
|
@ -82,5 +84,6 @@ server.listen(common.PORT, function() {
|
|||
process.on('exit', function() {
|
||||
assert.equal(N + 1, disconnect_count);
|
||||
assert.equal(N + 1, client_recv_count);
|
||||
assert.equal(N + 1, client_end_count);
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче