7 Commits

Author SHA1 Message Date
Roman Shtylman
a6845ec63b v1.5.0 2014-10-25 17:13:58 -07:00
Roman Shtylman
adecf03f41 update history 2014-10-25 17:13:49 -07:00
Roman Shtylman
9bdb40e97c when remote endpoint has an error, just close it 2014-10-25 17:05:19 -07:00
Roman Shtylman
006ce7733b v1.4.0 2014-08-31 22:59:17 -07:00
Roman Shtylman
624d279c26 History: update 2014-08-31 22:58:43 -07:00
Roman Shtylman
c2b8f2b7ab Merge pull request #57 from kesla/handle-etimedout
don't emit ETIMEDOUT-errors
2014-08-31 22:57:30 -07:00
David Björklund
4d9dcc1711 don't emit ETIMEDOUT-errors 2014-08-28 20:12:09 +02:00
3 changed files with 12 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
# 1.5.0 (2014-10-25)
* capture all errors on remote socket and restart the tunnel
# 1.4.0 (2014-08-31)
* don't emit errors for ETIMEDOUT
# 1.2.0 / 2014-04-28 # 1.2.0 / 2014-04-28
* return `client` from `localtunnel` API instantiation * return `client` from `localtunnel` API instantiation

View File

@@ -77,19 +77,14 @@ TunnelCluster.prototype.open = function() {
port: remote_port port: remote_port
}); });
remote.once('error', function(err) { remote.on('error', function(err) {
// emit connection refused errors immediately, because they // emit connection refused errors immediately, because they
// indicate that the tunnel can't be established. // indicate that the tunnel can't be established.
if (err.code === 'ECONNREFUSED') { if (err.code === 'ECONNREFUSED') {
self.emit('error', new Error('connection refused: ' + remote_host + ':' + remote_port + ' (check your firewall settings)')); self.emit('error', new Error('connection refused: ' + remote_host + ':' + remote_port + ' (check your firewall settings)'));
} }
else {
self.emit('error', err);
}
setTimeout(function() { remote.end();
self.emit('dead');
}, 1000);
}); });
function conn_local() { function conn_local() {

View File

@@ -2,7 +2,7 @@
"author": "Roman Shtylman <shtylman@gmail.com>", "author": "Roman Shtylman <shtylman@gmail.com>",
"name": "localtunnel", "name": "localtunnel",
"description": "expose localhost to the world", "description": "expose localhost to the world",
"version": "1.3.0", "version": "1.5.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/shtylman/localtunnel.git" "url": "git://github.com/shtylman/localtunnel.git"
@@ -22,4 +22,4 @@
"lt": "./bin/client" "lt": "./bin/client"
}, },
"main": "./client.js" "main": "./client.js"
} }