You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert(sequenceNumber == pingResponse.sequenceNumber,"callback invoked with not matching sequence number! Submitted with \(sequenceNumber) but invoked with \(pingResponse.sequenceNumber)!")
letcommand=SWIMNIOWriteCommand(message: message, to:self.node, replyTimeout: timeout.toNIO, replyCallback:{ reply in
47
+
switch reply {
48
+
case.success(.response(letpingResponse)):
49
+
assert(sequenceNumber == pingResponse.sequenceNumber,"callback invoked with not matching sequence number! Submitted with \(sequenceNumber) but invoked with \(pingResponse.sequenceNumber)!")
50
+
continuation.resume(returning: pingResponse)
53
51
54
-
case.success(let other):
55
-
fatalError("Unexpected message, got: [\(other)]:\(reflecting:type(of: other)) while expected \(PingResponse.self)")
56
-
}
57
-
})
52
+
case.failure(let error):
53
+
continuation.resume(throwing: error)
58
54
59
-
self.channel.writeAndFlush(command, promise:nil)
55
+
case.success(let other):
56
+
continuation.resume(throwing:SWIMNIOIllegalMessageTypeError("Unexpected message, got: [\(other)]:\(reflecting:type(of: other)) while expected \(PingResponse.self)"))
assert(sequenceNumber == pingResponse.sequenceNumber,"callback invoked with not matching sequence number! Submitted with \(sequenceNumber) but invoked with \(pingResponse.sequenceNumber)!")
letcommand=SWIMNIOWriteCommand(message: message, to:self.node, replyTimeout: timeout.toNIO, replyCallback:{ reply in
81
+
switch reply {
82
+
case.success(.response(letpingResponse)):
83
+
assert(sequenceNumber == pingResponse.sequenceNumber,"callback invoked with not matching sequence number! Submitted with \(sequenceNumber) but invoked with \(pingResponse.sequenceNumber)!")
84
+
continuation.resume(returning: pingResponse)
85
85
86
-
case.success(let other):
87
-
fatalError("Unexpected message, got: \(other) while expected \(PingResponse.self)")
88
-
}
89
-
})
86
+
case.failure(let error):
87
+
continuation.resume(throwing: error)
90
88
91
-
self.channel.writeAndFlush(command, promise:nil)
89
+
case.success(let other):
90
+
continuation.resume(throwing:SWIMNIOIllegalMessageTypeError("Unexpected message, got: \(other) while expected \(PingResponse.self)"))
0 commit comments