wip: 2023-06-05T12:12:07+0200 (1685959927)

This commit is contained in:
Victor Westerlund 2023-06-05 14:04:43 +02:00
parent 13e7e5301a
commit 93c91b8f77
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View file

@ -15,6 +15,7 @@ Homestead.yaml
npm-debug.log
yarn-error.log
public/robots.txt
__pycache__
# OS generated files #
######################

View file

@ -47,7 +47,9 @@ class Client:
# Close socket connection when class instance removed
def __del__(self):
self._socket.close()
# Close socket if connected
if (self._con == Connection.AF_UNIX):
self._socket.close()
# Resolve connection type from endpoint string.
# If the string is a valid URL we will treat it as HTTP otherwise we will assume it's a path on disk to a UNIX socket file.