NetFH.close() mehrfach aufrufbar ohne Fehler

Socket schließen, wenn Fehler bei Verbindung
This commit is contained in:
2017-09-21 12:59:25 +02:00
parent f679e66ead
commit d34d37f109
2 changed files with 12 additions and 11 deletions

View File

@@ -77,7 +77,7 @@ class NetFH(Thread):
try: try:
so.connect(self._address) so.connect(self._address)
except: except:
pass so.close()
else: else:
# Alten Socket trennen # Alten Socket trennen
with self.__socklock: with self.__socklock:
@@ -129,6 +129,7 @@ class NetFH(Thread):
self.__sockerr.set() self.__sockerr.set()
# Vom Socket sauber trennen # Vom Socket sauber trennen
if self._slavesock is not None:
with self.__socklock: with self.__socklock:
try: try:
if self.__sockend: if self.__sockend:

View File

@@ -16,7 +16,7 @@ setup(
license="LGPLv3", license="LGPLv3",
name="revpimodio2", name="revpimodio2",
version="2.1.1", version="2.1.1b2",
packages=["revpimodio2"], packages=["revpimodio2"],
python_requires="~=3.2", python_requires="~=3.2",
@@ -35,7 +35,7 @@ setup(
"zugegriffen werden.", "zugegriffen werden.",
classifiers=[ classifiers=[
"Development Status :: 5 - Production/Stable", "Development Status :: 4 - Beta",
"Environment :: Console", "Environment :: Console",
"Intended Audience :: Developers", "Intended Audience :: Developers",
"License :: OSI Approved :: " "License :: OSI Approved :: "