@@ -91,7 +91,7 @@ public final class RemoteChangeObserver: NSObject, @unchecked Sendable {
9191
9292 private func startPollingTimer( ) {
9393 guard !invalidated else {
94- self . logger. error ( " Starting polling timer while the current one is not invalidated yet! " )
94+ logger. error ( " Starting polling timer while the current one is not invalidated yet! " )
9595 return
9696 }
9797
@@ -134,7 +134,7 @@ public final class RemoteChangeObserver: NSObject, @unchecked Sendable {
134134 startPollingTimer ( )
135135 return
136136 }
137-
137+
138138 Task { [ weak self] in
139139 try await Task . sleep ( nanoseconds: self ? . webSocketReconfigureIntervalNanoseconds ?? 0 )
140140 await self ? . configureNotifyPush ( )
@@ -237,7 +237,7 @@ public final class RemoteChangeObserver: NSObject, @unchecked Sendable {
237237 webSocketPingTask. cancel ( )
238238 }
239239
240- let account = self . accountId
240+ let account = accountId
241241
242242 webSocketPingTask = Task . detached ( priority: . background) {
243243 do {
@@ -272,15 +272,15 @@ public final class RemoteChangeObserver: NSObject, @unchecked Sendable {
272272 return
273273 }
274274
275- guard await self . invalidated == false else {
275+ guard await invalidated == false else {
276276 return
277277 }
278278
279279 guard error == nil else {
280- self . logger. error ( " Websocket ping failed. " , [ . error: error] )
281- self . incrementWebSocketPingFailCount ( )
280+ logger. error ( " Websocket ping failed. " , [ . error: error] )
281+ incrementWebSocketPingFailCount ( )
282282
283- if self . webSocketPingFailCount > self . webSocketPingFailLimit {
283+ if webSocketPingFailCount > webSocketPingFailLimit {
284284 Task . detached ( priority: . medium) {
285285 self . reconnectWebSocket ( )
286286 }
@@ -309,20 +309,20 @@ public final class RemoteChangeObserver: NSObject, @unchecked Sendable {
309309
310310 switch result {
311311 case . failure:
312- let accountId = self . accountId
313- self . logger. debug ( " Failed to read websocket. " , [ . account: accountId] )
314- // Do not reconnect here, delegate methods will handle reconnecting
312+ let accountId = accountId
313+ logger. debug ( " Failed to read websocket. " , [ . account: accountId] )
314+ // Do not reconnect here, delegate methods will handle reconnecting
315315 case let . success( message) :
316316 switch message {
317317 case let . data( data) :
318- self . processWebsocket ( data: data)
318+ processWebsocket ( data: data)
319319 case let . string( string) :
320- self . processWebsocket ( string: string)
320+ processWebsocket ( string: string)
321321 @unknown default :
322- self . logger. error ( " Unknown case encountered while reading websocket! " )
322+ logger. error ( " Unknown case encountered while reading websocket! " )
323323 }
324324
325- self . readWebSocket ( )
325+ readWebSocket ( )
326326 }
327327 }
328328 }
@@ -371,14 +371,14 @@ public final class RemoteChangeObserver: NSObject, @unchecked Sendable {
371371 }
372372
373373 func setWebSocketPingInterval( to nanoseconds: UInt64 ) {
374- self . webSocketPingIntervalNanoseconds = nanoseconds
374+ webSocketPingIntervalNanoseconds = nanoseconds
375375 }
376376}
377377
378378// MARK: - URLSessionWebSocketDelegate
379379
380380extension RemoteChangeObserver : URLSessionWebSocketDelegate {
381- nonisolated public func urlSession( _: URLSession , webSocketTask _: URLSessionWebSocketTask , didOpenWithProtocol _: String ? ) {
381+ public nonisolated func urlSession( _: URLSession , webSocketTask _: URLSessionWebSocketTask , didOpenWithProtocol _: String ? ) {
382382 Task {
383383 guard invalidated == false else {
384384 return
@@ -389,7 +389,7 @@ extension RemoteChangeObserver: URLSessionWebSocketDelegate {
389389 }
390390 }
391391
392- nonisolated public func urlSession( _: URLSession , webSocketTask: URLSessionWebSocketTask , didCloseWith _: URLSessionWebSocketTask . CloseCode , reason: Data ? ) {
392+ public nonisolated func urlSession( _: URLSession , webSocketTask: URLSessionWebSocketTask , didCloseWith _: URLSessionWebSocketTask . CloseCode , reason: Data ? ) {
393393 Task {
394394 guard invalidated == false else {
395395 return
@@ -407,13 +407,13 @@ extension RemoteChangeObserver: URLSessionWebSocketDelegate {
407407 }
408408 }
409409
410- nonisolated public func urlSessionDidFinishEvents( forBackgroundURLSession _: URLSession ) { }
410+ public nonisolated func urlSessionDidFinishEvents( forBackgroundURLSession _: URLSession ) { }
411411}
412412
413413// MARK: - NextcloudKitDelegate methods
414414
415415extension RemoteChangeObserver : NextcloudKitDelegate {
416- nonisolated public func authenticationChallenge( _: URLSession , didReceive challenge: URLAuthenticationChallenge , completionHandler: @Sendable @escaping ( URLSession . AuthChallengeDisposition , URLCredential ? ) -> Void ) {
416+ public nonisolated func authenticationChallenge( _: URLSession , didReceive challenge: URLAuthenticationChallenge , completionHandler: @Sendable @escaping ( URLSession . AuthChallengeDisposition , URLCredential ? ) -> Void ) {
417417 Task { [ weak self] in
418418 guard let self else {
419419 return
@@ -447,17 +447,17 @@ extension RemoteChangeObserver: NextcloudKitDelegate {
447447 }
448448 }
449449
450- nonisolated public func networkReachabilityObserver( _ typeReachability: NKTypeReachability ) {
450+ public nonisolated func networkReachabilityObserver( _ typeReachability: NKTypeReachability ) {
451451 Task { [ weak self] in
452452 guard let self else {
453453 return
454454 }
455455
456- self . setNetworkReachability ( typeReachability)
456+ setNetworkReachability ( typeReachability)
457457 }
458458 }
459459
460- nonisolated public func downloadProgress(
460+ public nonisolated func downloadProgress(
461461 _: Float ,
462462 totalBytes _: Int64 ,
463463 totalBytesExpected _: Int64 ,
@@ -467,7 +467,7 @@ extension RemoteChangeObserver: NextcloudKitDelegate {
467467 task _: URLSessionTask
468468 ) { }
469469
470- nonisolated public func uploadProgress(
470+ public nonisolated func uploadProgress(
471471 _: Float ,
472472 totalBytes _: Int64 ,
473473 totalBytesExpected _: Int64 ,
@@ -477,13 +477,13 @@ extension RemoteChangeObserver: NextcloudKitDelegate {
477477 task _: URLSessionTask
478478 ) { }
479479
480- nonisolated public func downloadingFinish(
480+ public nonisolated func downloadingFinish(
481481 _: URLSession ,
482482 downloadTask _: URLSessionDownloadTask ,
483483 didFinishDownloadingTo _: URL
484484 ) { }
485485
486- nonisolated public func downloadComplete(
486+ public nonisolated func downloadComplete(
487487 fileName _: String ,
488488 serverUrl _: String ,
489489 etag _: String ? ,
@@ -494,7 +494,7 @@ extension RemoteChangeObserver: NextcloudKitDelegate {
494494 error _: NKError
495495 ) { }
496496
497- nonisolated public func uploadComplete(
497+ public nonisolated func uploadComplete(
498498 fileName _: String ,
499499 serverUrl _: String ,
500500 ocId _: String ? ,
@@ -505,7 +505,7 @@ extension RemoteChangeObserver: NextcloudKitDelegate {
505505 error _: NKError
506506 ) { }
507507
508- nonisolated public func request( _: Alamofire . DataRequest , didParseResponse _: Alamofire . AFDataResponse < some Any > ) { }
508+ public nonisolated func request( _: Alamofire . DataRequest , didParseResponse _: Alamofire . AFDataResponse < some Any > ) { }
509509
510510 ///
511511 /// Dispatches the asynchronous working set check.
0 commit comments