mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-05 06:55:11 +08:00
Fixed authentication timeout
CURA-1916
This commit is contained in:
parent
ee59da0704
commit
676182cd54
@ -157,13 +157,22 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
self._authentication_requested_message.hide()
|
self._authentication_requested_message.hide()
|
||||||
authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Printer was successfully paired with Cura"))
|
authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Printer was successfully paired with Cura"))
|
||||||
authentication_succeeded_message.show()
|
authentication_succeeded_message.show()
|
||||||
|
|
||||||
|
# Stop waiting for a response
|
||||||
|
self._authentication_timer.stop()
|
||||||
|
self._authentication_counter = 0
|
||||||
|
|
||||||
# Once we are authenticated we need to send all material profiles.
|
# Once we are authenticated we need to send all material profiles.
|
||||||
#
|
|
||||||
self.sendMaterialProfiles()
|
self.sendMaterialProfiles()
|
||||||
elif auth_state == AuthState.AuthenticationDenied:
|
elif auth_state == AuthState.AuthenticationDenied:
|
||||||
self._authentication_requested_message.hide()
|
self._authentication_requested_message.hide()
|
||||||
authentication_failed_message = Message(i18n_catalog.i18nc("@info:status", "Pairing request failed. This can be either due to a timeout or the printer refused the request."))
|
authentication_failed_message = Message(i18n_catalog.i18nc("@info:status", "Pairing request failed. This can be either due to a timeout or the printer refused the request."))
|
||||||
authentication_failed_message.show()
|
authentication_failed_message.show()
|
||||||
|
|
||||||
|
# Stop waiting for a response
|
||||||
|
self._authentication_timer.stop()
|
||||||
|
self._authentication_counter = 0
|
||||||
|
|
||||||
self._authentication_state = auth_state
|
self._authentication_state = auth_state
|
||||||
|
|
||||||
## Request data from the connected device.
|
## Request data from the connected device.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user