Skip to content

Commit 60b1fa7

Browse files
committed
fix tests
1 parent 9da59a0 commit 60b1fa7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Coder-Desktop/VPNLib/Speaker.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public actor Speaker<SendMsg: RPCMessage & Message, RecvMsg: RPCMessage & Messag
8888

8989
/// Does the VPN Protocol handshake and validates the result
9090
public func handshake() async throws(HandshakeError) {
91-
let hndsh = Handshaker(writeFD: writeFD, dispatch: dispatch, queue: queue, role: role)
91+
let hndsh = Handshaker(writeFD: writeFD, dispatch: dispatch, queue: queue, role: role,
92+
versions: [ProtoVersion(1, 1)])
9293
// ignore the version for now because we know it can only be 1.0 or 1.1.
9394
// 1.1 adds support for telemetry to StartRequest, but since setting these
9495
// fields won't adversely affect a 1.0 speaker, we set them regardless.
@@ -180,7 +181,7 @@ actor Handshaker {
180181

181182
init(writeFD: FileHandle, dispatch: DispatchIO, queue: DispatchQueue,
182183
role: ProtoRole,
183-
versions: [ProtoVersion] = [.init(1, 1)])
184+
versions: [ProtoVersion] = [.init(1, 0)])
184185
{
185186
self.writeFD = writeFD
186187
self.dispatch = dispatch

Coder-Desktop/VPNLibTests/SpeakerTests.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ struct SpeakerTests: Sendable {
2929
handshaker = Handshaker(
3030
writeFD: pipeMT.fileHandleForWriting,
3131
dispatch: dispatch, queue: queue,
32-
role: .manager
32+
role: .manager,
33+
versions: [ProtoVersion(1, 1)]
3334
)
3435
}
3536

0 commit comments

Comments
 (0)