Skip to content

Commit 5be2962

Browse files
committed
Cascade failure to response promise.
1 parent 43245ea commit 5be2962

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Sources/APNSwift/APNSwiftConnection.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ public final class APNSwiftConnection: APNSwiftClient {
199199
responsePromise: responsePromise
200200
)
201201

202+
streamPromise.futureResult.cascadeFailure(to: responsePromise)
202203
return streamPromise.futureResult.flatMap { stream in
203204
logger?.info("Send - sending")
204205
return stream.writeAndFlush(context).flatMapErrorThrowing { error in

Sources/APNSwiftExample/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var logger = Logger(label: "com.apnswift")
2828
logger.logLevel = .debug
2929
let apnsConfig = try APNSwiftConfiguration(
3030
authenticationMethod: .jwt(
31-
key: .private(filePath: "/Users/kylebrowning/Desktop/AuthKey_9UC9ZLQ8YW.p8"),
31+
key: .private(filePath: "/Users/kylebrowning/Documents/AuthKey_9UC9ZLQ8YW.p8"),
3232
keyIdentifier: "9UC9ZLQ8YW",
3333
teamIdentifier: "ABBM6U9RM5"
3434
),

0 commit comments

Comments
 (0)