From b6dbabfe3514d90a4f6a571162410fce410562c1 Mon Sep 17 00:00:00 2001
From: Marco Bartolucci <marco.bartolucci2@studio.unibo.it>
Date: Mon, 27 Feb 2017 12:02:51 +0100
Subject: [PATCH] Added server listen callback

---
 lib/http-proxy/index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/http-proxy/index.js b/lib/http-proxy/index.js
index caaa10b..37629d1 100644
--- a/lib/http-proxy/index.js
+++ b/lib/http-proxy/index.js
@@ -120,7 +120,7 @@ ProxyServer.prototype.onError = function (err) {
   }
 };
 
-ProxyServer.prototype.listen = function(port, hostname) {
+ProxyServer.prototype.listen = function(port, hostname, callback) {
   var self    = this,
       closure = function(req, res) { self.web(req, res); };
 
@@ -132,7 +132,7 @@ ProxyServer.prototype.listen = function(port, hostname) {
     this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });
   }
 
-  this._server.listen(port, hostname);
+  this._server.listen(port, hostname, callback);
 
   return this;
 };
-- 
GitLab