This commit is contained in:
fluzzi 2023-04-18 18:00:43 -03:00
parent 1cb0962fac
commit 404d874771
2 changed files with 5 additions and 2 deletions

View File

@ -1,2 +1,2 @@
__version__ = "3.0.6" __version__ = "3.0.7"

View File

@ -115,7 +115,10 @@ def stop_api():
print("Connpy api server is not running.") print("Connpy api server is not running.")
return return
# Send a SIGTERM signal to the process # Send a SIGTERM signal to the process
os.kill(pid, signal.SIGTERM) try:
os.kill(pid, signal.SIGTERM)
except:
pass
# Delete the PID file # Delete the PID file
os.remove(PID_FILE) os.remove(PID_FILE)
print(f"Server with process ID {pid} stopped.") print(f"Server with process ID {pid} stopped.")