[Python-modules-commits] [python-socksipy] 01/03: Import python-socksipy_1.6.5.orig.tar.gz
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 12:58:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-socksipy.
commit 1db043b293cae3496552cde631ef5859c23c6e8a
Author: W. Martin Borgert <debacle at debian.org>
Date: Sat Dec 24 12:48:09 2016 +0000
Import python-socksipy_1.6.5.orig.tar.gz
---
setup.py | 2 +-
socks.py | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/setup.py b/setup.py
index bbbe2f9..879ffbb 100755
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
from distutils.core import setup
-VERSION = "1.6.4"
+VERSION = "1.6.5"
setup(
name = "PySocks",
diff --git a/socks.py b/socks.py
index 4710779..9184eae 100644
--- a/socks.py
+++ b/socks.py
@@ -1,6 +1,6 @@
"""
SocksiPy - Python SOCKS module.
-Version 1.6.4
+Version 1.6.5
Copyright 2006 Dan-Haim. All rights reserved.
@@ -52,7 +52,7 @@ Modifications made by Anorov (https://github.com/Anorov)
-Various small bug fixes
"""
-__version__ = "1.6.4"
+__version__ = "1.6.5"
import socket
import struct
@@ -748,6 +748,10 @@ class socksocket(_BaseSocket):
raise GeneralProxyError("Invalid destination-connection (host, port) pair")
+ # We set the timeout here so that we don't hang in connection or during
+ # negotiation.
+ _BaseSocket.settimeout(self, self._timeout)
+
if proxy_type is None:
# Treat like regular socket object
self.proxy_peername = dest_pair
@@ -758,7 +762,7 @@ class socksocket(_BaseSocket):
proxy_addr = self._proxy_addr()
try:
- # Initial connection to proxy server
+ # Initial connection to proxy server.
_BaseSocket.connect(self, proxy_addr)
except socket.error as error:
@@ -778,7 +782,6 @@ class socksocket(_BaseSocket):
# Calls negotiate_{SOCKS4, SOCKS5, HTTP}
negotiate = self._proxy_negotiators[proxy_type]
negotiate(self, dest_addr, dest_port)
- _BaseSocket.settimeout(self, self._timeout)
except socket.error as error:
# Wrap socket errors
self.close()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-socksipy.git
More information about the Python-modules-commits
mailing list