Skip to content

Commit a502eae

Browse files
committed
Fix build error
1 parent e2b861b commit a502eae

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Sources/NetworkingClient/Tasks/NetworkTaskValues.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ internal actor NetworkTaskValues<T: Sendable> {
4141
/// The current ``URLSessionTask`` instance, if any.
4242
internal var sessionTask: URLSessionTask?
4343

44-
/// The current execution state of a task.
45-
internal private(set) var state = TaskState.created
46-
4744
/// The stream continuation for emitting progress values.
4845
private var stateStreamContinuation: AsyncStream<TaskState>.Continuation? {
4946
didSet {
@@ -60,6 +57,13 @@ internal actor NetworkTaskValues<T: Sendable> {
6057
}
6158
}()
6259

60+
/// The current execution state of a task.
61+
internal private(set) var state = TaskState.created {
62+
didSet {
63+
stateStreamContinuation?.yield(state)
64+
}
65+
}
66+
6367
// MARK: - Initializer
6468
/// Creates a new task state container.
6569
///
@@ -128,7 +132,6 @@ internal actor NetworkTaskValues<T: Sendable> {
128132
return false
129133
}
130134
state = newState
131-
stateStreamContinuation?.yield(state)
132135
return true
133136
}
134137

0 commit comments

Comments
 (0)