Skip to content

Commit 889a67c

Browse files
committed
SwiftOCADevice: fix IORing backend heartbeat times
they were swapped: keepalives are optional for TCP, but not UDP
1 parent 26b5ecb commit 889a67c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftOCADevice/OCP.1/Backend/IORing/Ocp1IORingController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ actor Ocp1IORingStreamController: Ocp1IORingControllerPrivate, CustomStringConve
144144
_messagesContinuation.finish()
145145
}
146146

147-
var heartbeatTime = Duration.seconds(1) {
147+
var heartbeatTime = Duration.seconds(0) {
148148
didSet {
149149
heartbeatTimeDidChange(from: oldValue)
150150
}
@@ -220,7 +220,7 @@ actor Ocp1IORingDatagramController: Ocp1IORingControllerPrivate, Ocp1ControllerD
220220
self.peerAddress = peerAddress
221221
}
222222

223-
var heartbeatTime = Duration.seconds(0) {
223+
var heartbeatTime = Duration.seconds(1) {
224224
didSet {
225225
heartbeatTimeDidChange(from: oldValue)
226226
}

0 commit comments

Comments
 (0)