'Stop the onionshare server.'

def stop_server(self):

    common.log('OnionShareGui', 'stop_server')
    if (self.server_status.status != self.server_status.STATUS_STOPPED):
        web.stop(self.app.port)
    self.app.cleanup()
    self.filesize_warning.hide()
    self.stop_server_finished.emit()
    self.set_server_active(False)
