File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Sources/PubNub/Networking/Request Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -101,18 +101,18 @@ final class Request {
101
101
102
102
deinit {
103
103
PubNub . log. debug ( " Request Destroyed \( requestID) " )
104
-
104
+
105
105
let currentState = atomicState. lockedRead { $0 }
106
106
let taskState = currentState. taskState
107
-
107
+
108
108
// Ensure that the response is always delivered to the caller. This situation could occur if the task is created
109
109
// but not yet resumed, and the session is invalidated in the meantime.
110
110
if taskState == . initialized {
111
111
let error = PubNubError ( . clientCancelled)
112
112
atomicState. lockedWrite { $0. error = error }
113
113
finish ( error: error)
114
114
}
115
-
115
+
116
116
atomicState. lockedWrite { $0. purgeAll ( ) }
117
117
}
118
118
You can’t perform that action at this time.
0 commit comments