mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-07 00:45:11 -04:00
Calculate the time difference in a more appropriate spot (rather than on clicking Start, but when the server is ready, as it may have taken some time, but should still stop at the nominated time)
This commit is contained in:
parent
44fb6c69ae
commit
b618d8c15d
2 changed files with 11 additions and 10 deletions
|
@ -186,14 +186,6 @@ class ServerStatus(QtWidgets.QVBoxLayout):
|
|||
The server has finished starting.
|
||||
"""
|
||||
self.status = self.STATUS_STARTED
|
||||
if self.server_shutdown_timeout_checkbox.isChecked():
|
||||
# Convert the date value to seconds between now and then
|
||||
now = QtCore.QDateTime.currentDateTime()
|
||||
self.timeout = now.secsTo(self.server_shutdown_timeout.dateTime())
|
||||
# Set the shutdown timeout value
|
||||
if self.timeout > 0:
|
||||
self.app.shutdown_timer = common.close_after_seconds(self.timeout)
|
||||
self.app.shutdown_timer.start()
|
||||
self.copy_url()
|
||||
self.update()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue