From 006f3d89834e38a98b2631d86579aa2cd7f5a616 Mon Sep 17 00:00:00 2001 From: Pavel White Date: Sat, 31 Oct 2020 11:49:39 +0300 Subject: [PATCH 1/4] Update sshtunnel.py --- sshtunnel.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sshtunnel.py b/sshtunnel.py index c052112..dd12218 100644 --- a/sshtunnel.py +++ b/sshtunnel.py @@ -36,7 +36,7 @@ input_ = input -__version__ = '0.2.1' +__version__ = '0.2.2' __author__ = 'pahaz' @@ -1329,7 +1329,12 @@ def start(self): def stop(self, force=False): """ - Shut the tunnel down. + Shut the tunnel down. By default we are always waiting until closing + all connections. You can use `force=True` to force close connections + + Keyword Arguments: + force (bool): + Force close current connections .. note:: This **had** to be handled with care before ``0.1.0``: From 3cc93c27f7caee0ee3117cad09509fe44cde2cad Mon Sep 17 00:00:00 2001 From: Pavel White Date: Sat, 31 Oct 2020 12:27:41 +0300 Subject: [PATCH 2/4] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index c94e6b4..edefc53 100644 --- a/README.rst +++ b/README.rst @@ -107,7 +107,7 @@ port. from sshtunnel import SSHTunnelForwarder server = SSHTunnelForwarder( - 'pahaz.urfuclub.ru', + 'alfa.8iq.dev', ssh_username="pahaz", ssh_password="secret", remote_bind_address=('127.0.0.1', 8080) @@ -229,7 +229,7 @@ CLI usage ssh_address Pure python ssh tunnel utils - Version 0.2.1 + Version 0.2.2 positional arguments: ssh_address SSH server IP address (GW for SSH tunnels) From 090a1c168e04ac5bc65ab02b6aa5767ac1171dcf Mon Sep 17 00:00:00 2001 From: Pavel White Date: Sat, 31 Oct 2020 12:28:38 +0300 Subject: [PATCH 3/4] style --- sshtunnel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshtunnel.py b/sshtunnel.py index dd12218..b1f4514 100644 --- a/sshtunnel.py +++ b/sshtunnel.py @@ -1329,7 +1329,7 @@ def start(self): def stop(self, force=False): """ - Shut the tunnel down. By default we are always waiting until closing + Shut the tunnel down. By default we are always waiting until closing all connections. You can use `force=True` to force close connections Keyword Arguments: From ac4b89a2b7b49c02a9f513fdeac2694e2095f7e7 Mon Sep 17 00:00:00 2001 From: Pavel White Date: Sat, 31 Oct 2020 12:35:44 +0300 Subject: [PATCH 4/4] Update changelog.rst --- changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.rst b/changelog.rst index 32cef1a..160311f 100644 --- a/changelog.rst +++ b/changelog.rst @@ -19,6 +19,9 @@ CONTRIBUTORS CHANGELOG ========= +- v.0.2.2 (`Pahaz`_) + + Add `.stop(force=True)` for force close active connections (`#201`_) + - v.0.2.1 (`Pahaz`_, `Eddie Chiang`_ and `kkrasovskii`_) + Fixes bug with orphan thread for a tunnel that is DOWN (`#170`_) @@ -148,4 +151,5 @@ CHANGELOG .. _#43: https://github.com/pahaz/sshtunnel/issues/43 .. _#46: https://github.com/pahaz/sshtunnel/issues/46 .. _#170: https://github.com/pahaz/sshtunnel/issues/170 +.. _#201: https://github.com/pahaz/sshtunnel/issues/201 .. _detail: https://github.com/pahaz/sshtunnel/commit/64af238b799b0e0057c4f9b386cda247e0006da9#diff-76bc1662a114401c2954deb92b740081R127