Skip to content

Commit

Permalink
await on async operations
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed May 13, 2024
1 parent 0e58e24 commit 7a0d900
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Test/AwsCommonRuntimeKitTests/mqtt/Mqtt5ClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1911,8 +1911,9 @@ class Mqtt5ClientTests: XCBaseTestCase {

let topic = "test/MQTT5_Binding_Swift_" + UUID().uuidString
let subscribePacket = PublishPacket(qos: QoS.atLeastOnce, topic: topic)
async let _ = try? client.publish(publishPacket: subscribePacket)

Task {
let _ = try? await client.publish(publishPacket: subscribePacket)
}
client.close()
}
}

0 comments on commit 7a0d900

Please sign in to comment.