mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
better handling of requests that die
This commit is contained in:
6
proxy.js
6
proxy.js
@@ -139,8 +139,14 @@ Proxy.prototype.next_socket = function(cb) {
|
||||
return self.waiting.push(cb);
|
||||
}
|
||||
|
||||
var done_called = false;
|
||||
// put the socket back
|
||||
function done() {
|
||||
if (done_called) {
|
||||
throw new Error('done called multiple times');
|
||||
}
|
||||
|
||||
done_called = true;
|
||||
if (!sock.destroyed) {
|
||||
debug('retuning socket');
|
||||
self.sockets.push(sock);
|
||||
|
||||
Reference in New Issue
Block a user