def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.stop_event)
self.stop_requested = True
# Send the http request to shutdown the server
try:
urllib2.urlopen('http://localhost:80/shutdown')
except Exception:
urllib2.urlopen('http://localhost:5000/shutdown')
评论列表
文章目录