File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Sources/WebRequest/Manager Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -130,11 +130,11 @@ private extension WebRequestManager {
130130 . filter { $0. state == . ready || $0. state == . unauthorized }
131131
132132 guard let session = self . sessionProvider? . current else {
133- notificationCenter. post ( UnauthorizedResponseNotification)
134133 if let anyRequest = readyRequests. first? . originalRequest {
135134 self . fail ( request: anyRequest, withStatus: 401 )
136135 }
137136 for wrapper in readyRequests { wrapper. state = . cancelled }
137+ notificationCenter. post ( UnauthorizedResponseNotification)
138138 return
139139 }
140140
@@ -160,11 +160,11 @@ private extension WebRequestManager {
160160 return
161161 }
162162
163+ try wrapper. originalRequest. completion ? ( actualResult, wrapper. originalRequest)
164+
163165 if wrapper. state == . unauthorized {
164166 notificationCenter. post ( UnauthorizedResponseNotification)
165167 }
166-
167- try wrapper. originalRequest. completion ? ( actualResult, wrapper. originalRequest)
168168 }
169169
170170 func shouldRefresh( since timestamp: TimeInterval ) -> Bool {
You can’t perform that action at this time.
0 commit comments