Skip to content

Commit f442010

Browse files
committed
Wrapping the subscription in a using statement
1 parent 5ded9d4 commit f442010

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Assets/PatchKit Patcher/Scripts/Patcher.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,10 @@ private void ThreadUpdateApp(bool automatically, CancellationToken cancellationT
798798
{
799799
_updaterStatus.Value = appUpdater.Status;
800800

801-
_updaterStatus.Take(1).Subscribe((status) => _state.Value = PatcherState.UpdatingApp);
802-
803-
appUpdater.Update(_updateAppCancellationTokenSource.Token);
801+
using (_updaterStatus.Take(1).Subscribe((status) => _state.Value = PatcherState.UpdatingApp))
802+
{
803+
appUpdater.Update(_updateAppCancellationTokenSource.Token);
804+
}
804805
}
805806
finally
806807
{

0 commit comments

Comments
 (0)