Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
node-http-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
node-http-proxy
Commits
558a8a4f
Commit
558a8a4f
authored
Sep 02, 2011
by
isaacs
Committed by
indexzero
Sep 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resume() can throw
parent
84be9f2c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
lib/node-http-proxy.js
lib/node-http-proxy.js
+30
-6
No files found.
lib/node-http-proxy.js
View file @
558a8a4f
...
...
@@ -554,7 +554,11 @@ HttpProxy.prototype.proxyRequest = function (req, res, options) {
//console.error('backpressure 554');
response
.
pause
();
res
.
once
(
'
drain
'
,
function
()
{
try
{
response
.
resume
();
}
catch
(
er
)
{
console
.
error
(
"
response.resume error: %s
"
,
er
.
message
);
}
});
setTimeout
(
function
()
{
res
.
emit
(
'
drain
'
);
...
...
@@ -594,7 +598,11 @@ HttpProxy.prototype.proxyRequest = function (req, res, options) {
//console.error('backpressure 594');
req
.
pause
();
reverseProxy
.
once
(
'
drain
'
,
function
()
{
try
{
req
.
resume
();
}
catch
(
er
)
{
console
.
error
(
"
req.resume error: %s
"
,
er
.
message
);
}
});
setTimeout
(
function
()
{
reverseProxy
.
emit
(
'
drain
'
);
...
...
@@ -672,7 +680,11 @@ HttpProxy.prototype._forwardRequest = function (req) {
//console.error('backpressure 672');
req
.
pause
();
forwardProxy
.
once
(
'
drain
'
,
function
()
{
try
{
req
.
resume
();
}
catch
(
er
)
{
console
.
error
(
"
req.resume error: %s
"
,
er
.
message
);
}
});
setTimeout
(
function
()
{
forwardProxy
.
emit
(
'
drain
'
);
...
...
@@ -777,7 +789,11 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
//console.error('backpressure 777');
proxySocket
.
pause
();
reverseProxy
.
incoming
.
socket
.
once
(
'
drain
'
,
function
()
{
try
{
proxySocket
.
resume
();
}
catch
(
er
)
{
console
.
error
(
"
proxySocket.resume error: %s
"
,
er
.
message
);
}
});
setTimeout
(
function
()
{
reverseProxy
.
incoming
.
socket
.
emit
(
'
drain
'
);
...
...
@@ -804,7 +820,11 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
//console.error('backpressure 804');
reverseProxy
.
incoming
.
socket
.
pause
();
proxySocket
.
once
(
'
drain
'
,
function
()
{
try
{
reverseProxy
.
incoming
.
socket
.
resume
();
}
catch
(
er
)
{
console
.
error
(
"
reverseProxy.incoming.socket.resume error: %s
"
,
er
.
message
);
}
});
setTimeout
(
function
()
{
proxySocket
.
emit
(
'
drain
'
);
...
...
@@ -974,7 +994,11 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
//console.error('backpressure 974');
reverseProxy
.
socket
.
pause
();
socket
.
once
(
'
drain
'
,
function
()
{
try
{
reverseProxy
.
socket
.
resume
();
}
catch
(
er
)
{
console
.
error
(
"
reverseProxy.socket.resume error: %s
"
,
er
.
message
);
}
});
setTimeout
(
function
()
{
socket
.
emit
(
'
drain
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment