index.js
function () {
        if (!this._tunnel) {
            return q();
        }

        var _this = this;

        this._tunnel.kill('SIGTERM');
        return this._closeDeferred.promise.timeout(3000).fail(function () {
            _this._tunnel.kill('SIGKILL');
            return _this._closeTunnel(-1);
        });
    }
function () {
        if (!this._tunnel) {
            return q();
        }

        var _this = this;

        this._tunnel.kill('SIGTERM');
        return this._closeDeferred.promise.timeout(3000).fail(function () {
            _this._tunnel.kill('SIGKILL');
            return _this._closeTunnel(-1);
        });
    }
function ( ) { if ( ! this . _tunnel ) { return q ( ) ; } var _this = this ; this . _tunnel . kill ( 'SIGTERM' ) ; return this . _closeDeferred . promise . timeout ( 3000 ) . fail ( function ( ) { _this . _tunnel . kill ( 'SIGKILL' ) ; return _this . _closeTunnel ( - 1 ) ; } ) ; }
Closes connection. If no connection established does nothing
@returns {Promise}
Closes connection . If no connection established does nothing