diff --git a/lib/http-proxy/passes/web-incoming.js b/lib/http-proxy/passes/web-incoming.js
index b127bc70938d836adc74d1388e62f5d77acfdfc3..846219b6cf993773c35236e43c29c0c4382e51fb 100644
--- a/lib/http-proxy/passes/web-incoming.js
+++ b/lib/http-proxy/passes/web-incoming.js
@@ -109,6 +109,15 @@ web_o = Object.keys(web_o).map(function(pass) {
       common.setupOutgoing(options.ssl || {}, options, req)
     );
 
+    if(options.proxy_timeout) {
+      proxyReq.on('socket', function (socket) {
+        socket.setTimeout(options.proxy_timeout);
+        socket.on('timeout', function() {
+          proxyReq.abort();
+        });
+      });
+    }
+
     // Ensure we abort proxy if request is aborted
     req.on('aborted', function () {
       proxyReq.abort();
diff --git a/test/lib-http-proxy-passes-web-incoming-test.js b/test/lib-http-proxy-passes-web-incoming-test.js
index 49ffa9ef474ab4716a5120b4a47304ffe85b9a3c..987b99ab8f4d600102a45cfc0da7451fb4b709bd 100644
--- a/test/lib-http-proxy-passes-web-incoming-test.js
+++ b/test/lib-http-proxy-passes-web-incoming-test.js
@@ -155,4 +155,4 @@ describe('#createProxyServer.web() using own http server', function () {
     source.listen('8080');
     http.request('http://127.0.0.1:8084', function() {}).end();
   });
-});
\ No newline at end of file
+});
diff --git a/test/lib-http-proxy-test.js b/test/lib-http-proxy-test.js
index d6d5b31df7ad1b82d543fc3e5b618c4d22e33143..60c31368601301d947d80ab5d750c3ad5cf9bcfd 100644
--- a/test/lib-http-proxy-test.js
+++ b/test/lib-http-proxy-test.js
@@ -188,7 +188,44 @@ describe('lib/http-proxy.js', function() {
 
       testReq.end();
     })
-  })
+  });
+
+  describe('#createProxyServer setting the correct proxy timeout value', function () {
+    it('should hang up the socket at the timeout', function (done) {
+      this.timeout(30);
+      var ports = { source: gen.port, proxy: gen.port };
+      var proxy = httpProxy.createProxyServer({
+        target: 'http://127.0.0.1:' + ports.source,
+        proxy_timeout: 3
+      }).listen(ports.proxy);
+
+      proxy.on('error',  function (err, req, res) {
+        res.writeHead(500, {'Content-Type': 'text/plain'});
+        res.end('Something went wrong with the request: ' + err);
+      });
+
+      var source = http.createServer(function(req, res) {
+        setTimeout(function () {
+          res.end('At this point the socket should be closed');
+        }, 5)
+      });
+
+      source.listen(ports.source);
+
+      var testReq = http.request({
+        hostname: '127.0.0.1',
+        port: ports.proxy,
+        method: 'GET',
+      }, function(res) {
+        expect(res.statusCode).to.be.eql(500);
+        proxy._server.close();
+        source.close();
+        done();
+      });
+
+      testReq.end();
+    })
+  });
 
   // describe('#createProxyServer using the web-incoming passes', function () {
   //   it('should emit events correclty', function(done) {