Fixed a little issue in the background client related to shutting it down. eric7

Mon, 27 Sep 2021 11:51:38 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 27 Sep 2021 11:51:38 +0200
branch
eric7
changeset 8649
01eb78cba360
parent 8648
c908f66b9d19
child 8650
100726f55a9a

Fixed a little issue in the background client related to shutting it down.

eric7/Utilities/BackgroundClient.py file | annotate | diff | comparison | revisions
--- a/eric7/Utilities/BackgroundClient.py	Mon Sep 27 10:51:37 2021 +0200
+++ b/eric7/Utilities/BackgroundClient.py	Mon Sep 27 11:51:38 2021 +0200
@@ -209,8 +209,9 @@
         finally:
             # Give time to process latest response on server side
             time.sleep(0.5)
-            self.connection.shutdown(socket.SHUT_RDWR)
-            self.connection.close()
+            with contextlib.suppress(OSError):
+                self.connection.shutdown(socket.SHUT_RDWR)
+                self.connection.close()
 
 if __name__ == '__main__':
     if len(sys.argv) != 5:

eric ide

mercurial