Kenneth Skovhede
3ae93f0102
Prevent thread leak in TrayIcon
...
This PR changes the termination signal to a `CancellationToken` instead of a `ManualResetEvent` as the former works better with async code.
With this change there is no longer a thread being captured during each long poll operation.
This fixes #6452
2025-08-07 11:50:01 +02:00
Kenneth Skovhede
d94ca804ea
Fixed CodeQL compile issue + a warning
2025-08-07 11:24:10 +02:00
Kenneth Skovhede
279351a8b6
Updated HttpServerConnection to support nullable.
...
Fixed an issue that caused crashing on start if the TrayIcon was not hosting the server.
2025-07-08 13:03:33 +02:00
Marcelo C.
f7bb2d0e6b
Ammending changes
2025-06-27 11:19:24 -03:00
Marcelo C.
3863dbe7ce
Addresses shutdown and thread safety issues
...
Improvement on AvaloniaRunner, HttpServerConnection, and HostedInstanceKeeper to prevent race conditions during shutdown.
Adds cancellation tokens and locking mechanisms to ensure that operations are properly stopped and resources are released in a controlled manner.
Also handles a NullReferenceException during Avalonia shutdown, and avoids invoking `InstanceShutdown` or `ConnectionClosed` multiple times.
2025-06-25 15:24:04 -03:00
Kenneth Skovhede
71e926beea
One more FIXMEGlobal property removed
2025-05-04 12:13:15 +02:00
Kenneth Skovhede
b10f888d86
Updated HttpServerConnection to use async and channels instead of a locked queue with threads
2025-03-25 10:54:10 +01:00
Kenneth Skovhede
fca218dc60
Allow trayicon without server
...
This adds support for starting the trayicon even if there is no server.
The trayicon will start up in a disconnected state and stay like that until it manages to connect.
This fixes Support TrayIcon running with no connection #5993
2025-03-25 10:40:45 +01:00
Kenneth Skovhede
68d11a2a8b
Improved support for disabled signin tokens and trayicon with a hosted server
2025-02-10 10:22:16 +01:00
Kenneth Skovhede
42044543ff
Added support for disabled signin tokens and trayicon
2025-02-09 11:35:27 +01:00
Kenneth Skovhede
4be739ff2f
Updated logic for reconnect.
...
This fixes a case where using a wrong password could cause an infinite loop.
2025-02-08 17:31:49 +01:00
Kenneth Skovhede and GitHub
9464caf622
Feature/update license 2025 ( #5851 )
...
* Fixed some minor whitespace issues
* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede and GitHub
d940af1f64
Fixed TrayIcon disconnecting. ( #5819 )
...
This fixes a problem where the exception was not correctly detected causing the token to not be re-obtained.
This fixes #5818
2024-12-28 20:02:21 +01:00
Kenneth Skovhede and GitHub
b69d9ae37b
Fixed a thread crash on stop ( #5798 )
2024-12-19 22:37:44 +01:00
Kenneth Skovhede
998c564aaf
Fixed hang from detached TrayIcon.
...
This fixes #5703
2024-11-26 11:23:28 +01:00
Kenneth Skovhede
d9953852ad
Fixed compile errors on Windows
2024-10-30 10:51:32 +01:00
Kenneth Skovhede
ff25d91663
Simplified code a bit.
...
Added support for multiple cert-hashes.
Made `server-util` auto-detect hashes as well.
2024-10-29 14:38:23 +01:00
Kenneth Skovhede
e914794b30
Simplified running TrayIcon with self-signed certificate.
...
Added workaround method to avoid loading certificate directly as that crashes .NET with EC-based keys.
2024-10-29 13:28:44 +01:00
Kenneth Skovhede
5b0e22843c
Fix detached tray-icon
...
This fixes a logic issue that prevents a detached tray-icon from obtaining a connection to a non-hosted server.
2024-08-20 12:15:18 +02:00
Kenneth Skovhede
f7a804aec7
Removed unused files and methods
2024-08-13 22:37:36 +02:00
Kenneth Skovhede
e980d7daee
This adds back the missing ProposedSchedule to the server state.
...
This handles the missing information part in #5436
2024-08-13 22:24:15 +02:00
Kenneth Skovhede
dfbcff5d47
Fixed error messages for requests with no response
2024-07-18 21:29:36 +02:00
Kenneth Skovhede
c9f8e5786c
Minor fixes
2024-06-20 22:22:49 +02:00
Kenneth Skovhede
a47af06bb7
Added throttle for request retries on failures
2024-06-20 14:22:49 +02:00
Kenneth Skovhede
edc0fb5e4b
Fixed re-login for tray-icon
2024-06-20 06:57:46 +02:00
Kenneth Skovhede
3f29642f6c
Implemented JWT tokens.
...
Added auth requirement on all endpoints.
Added SignIn-, Access- and Refresh-Tokens based on JWT.
Upgraded stored password to be based on PBKDF2.
Added default password assignment.
Updated logic to support auth-header and re-sign-in for tray-icon and web-ui.
2024-06-19 13:54:10 +02:00
Kenneth Skovhede
473c6cbbb8
Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade
2024-03-04 12:21:53 +01:00
Kenneth Skovhede
40dd3c6816
Updated all license mentions to MIT
2024-02-28 15:45:30 +01:00
Thomas Suckow
898193fcef
For now, just interrupt since its better than NOP.
2021-04-03 20:54:47 -07:00
Kenneth Hsu
69d153a121
Mark fields as readonly but allow for deserializer to set them.
...
This will prevent accidental reassignment of these fields. Without the
JsonProperty attribute, we would encounter an issue starting the server
when a password was set on the web UI.
2020-01-26 09:49:10 -08:00
Kenneth Hsu
1bbcc09c86
Remove readonly keyword from fields that are set by deserializer.
...
Making these readonly resulted in startup issues when the password was
set for the UI.
See forum discussion here:
https://forum.duplicati.com/t/after-last-update-duplicati-doesnt-work-anymore/8369
2019-11-04 19:11:18 -08:00
Kenneth Hsu
2aa76881a5
Mark fields that don't need to be reassigned as readonly.
...
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Skovhede
81ac1bf3a3
Added guards to prevent a null-error when attempting to connect to a password protected server without a password.
2019-09-20 12:49:28 +02:00
Kenneth Hsu
d26d538b22
Revert "Remove unused StopTask method."
...
This reverts commit d6688936ed .
2019-05-06 20:13:04 -07:00
Kenneth Hsu
e3d04dd5f1
Revert "Remove unused AbortTask method."
...
This reverts commit 523b95abf9 .
2019-05-06 20:13:03 -07:00
Kenneth Hsu
8f19322657
Revert "Remove unused RunBackup method."
...
This reverts commit 3dd4132af1 .
2019-05-06 20:13:03 -07:00
Kenneth Hsu
bc1ac322f8
Revert "Remove unused DismissNotification method."
...
This reverts commit 9ab8058354 .
2019-05-06 20:13:01 -07:00
Kenneth Hsu
9ab8058354
Remove unused DismissNotification method.
2019-04-27 16:39:43 -07:00
Kenneth Hsu
3dd4132af1
Remove unused RunBackup method.
2019-04-27 16:38:27 -07:00
Kenneth Hsu
523b95abf9
Remove unused AbortTask method.
2019-04-27 16:37:20 -07:00
Kenneth Hsu
d6688936ed
Remove unused StopTask method.
2019-04-27 16:37:10 -07:00
Kenneth Hsu
5edc9f2d13
Remove unused BackkgroundRequest constructor.
2019-04-27 16:35:42 -07:00
verhoek
b2cc18426c
Renamed Library.IO to Library.Common.IO.
...
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek
bc053df294
Moved basic IO helper functions to Library.IO.
2018-10-27 12:17:07 +02:00
Kenneth Hsu
d4d1945faf
Use utility method to append trailing slash.
...
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Kenneth Skovhede
4762a35ae3
Added option to disable automatic tray-icon login.
2018-06-15 14:35:35 +02:00
Kenneth Hsu
f12858e6a5
Mark fields that shouldn't be reassigned as readonly.
...
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07:00
Kenneth Skovhede
ee64517f7d
Removed calls to Console.WriteLine as we may run somewhere without a console.
2018-05-15 11:29:08 +02:00
Kenneth Hsu
c00c6fd19b
Make fields containing lock objects readonly.
...
If one of these fields is accidentally reassigned, it's possible for
threads to be oblivious to an existing lock. By making the fields
readonly, we will be notified at compile-time if we inadvertently
redefine one of these fields.
2018-03-17 19:59:23 -07:00
Max
0380f6d453
fixes password change in hosted tray
2018-02-25 13:54:20 +01:00