Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Black hole tcp reads after destroy()
  • Loading branch information
piscisaureus committed Oct 7, 2011
1 parent 899358e commit fcad5e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/net_uv.js
Expand Up @@ -4,6 +4,8 @@ var timers = require('timers');
var util = require('util');
var assert = require('assert');

function noop() {};

// constructor for lazy loading
function createPipe() {
var Pipe = process.binding('pipe_wrap').Pipe;
Expand Down Expand Up @@ -267,6 +269,7 @@ Socket.prototype.destroy = function(exception) {
debug('close');
if (this._handle) {
this._handle.close();
this._handle.onread = noop;
this._handle = null;
}

Expand Down

0 comments on commit fcad5e3

Please sign in to comment.