libsaria: Only shutdown server when server exists

I now always call the shutdown() function to close the server.  This
function checks if the server pointer has been set, and if it has it
calls the server's shutdown() function.
This commit is contained in:
Bryan Schumaker 2011-05-25 21:09:43 -04:00
parent c79677e77a
commit 756c98285b
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,7 @@ def startup():
def shutdown():
audio.shutdown()
if version.__dev__ == True:
server.shutdown()
server.shutdown()
## import plugin
## plugin.quit()

View File

@ -14,4 +14,5 @@ def setup_server():
threading.Thread(target=setup_server).start()
def shutdown():
server.shutdown()
if server != None:
server.shutdown()