Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Oct 1, 2024
1 parent e6f819a commit 703a5f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class SubscribeEventsExample(
if (events.isNotEmpty()) {
receivedEvents.addAll(events)
}
yield() // Ensure coroutine checks for cancellation
yield()
}
} catch (e: CancellationException) {
println("Data channel processing cancelled")
} finally {
println("Data channel processing finished")
dataChannel.cancel() // Ensure the channel is closed
dataChannel.cancel()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.onflow.flow.sdk.crypto.PrivateKey
class SubscribeExecutionDataExample(
privateKey: PrivateKey,
accessApiConnection: FlowAccessApi

) {
private val accessAPI = accessApiConnection
private val connector = AccessAPIConnector(privateKey, accessAPI)
Expand Down Expand Up @@ -67,4 +66,3 @@ class SubscribeExecutionDataExample(
errorJob.join()
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class SubscribeEventsExampleTest {
val receivedEvents = mutableListOf<FlowEvent>()
try {
val streamJob = launch {
withTimeoutOrNull(10_000L) { // Set timeout to ensure test completes in a reasonable time
withTimeoutOrNull(10_000L) {
subscribeEventsExample.streamEvents(testScope, receivedEvents)
}
}
Expand Down

0 comments on commit 703a5f6

Please sign in to comment.