Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Feb 27, 2021
1 parent 3fecee9 commit 0066a62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 94 deletions.
24 changes: 2 additions & 22 deletions lib/core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class Parser extends HTTPParser {
}
this.resuming = false

socketResume(this.socket)
this.socket.resume()
}

this._pause = () => {
Expand All @@ -421,7 +421,7 @@ class Parser extends HTTPParser {

this.paused = true

socketPause(this.socket)
this.socket.pause()
}

socket.on('data', onSocketData)
Expand Down Expand Up @@ -891,26 +891,6 @@ function connect (client) {
.on('close', onSocketClose)
}

function socketPause (socket) {
if (socket._handle && socket._handle.reading) {
socket._handle.reading = false
const err = socket._handle.readStop()
if (err) {
socket.destroy(util.errnoException(err, 'read'))
}
}
}

function socketResume (socket) {
if (socket._handle && !socket._handle.reading) {
socket._handle.reading = true
const err = socket._handle.readStart()
if (err) {
socket.destroy(util.errnoException(err, 'read'))
}
}
}

function emitDrain (client) {
client[kNeedDrain] = 0
client.emit('drain')
Expand Down
72 changes: 0 additions & 72 deletions test/socket-handle-error.js

This file was deleted.

0 comments on commit 0066a62

Please sign in to comment.