Skip to content

Commit

Permalink
Handled a particular error.
Browse files Browse the repository at this point in the history
  • Loading branch information
sberrevoets committed Mar 21, 2024
1 parent 1906886 commit b4c1bd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Sources/NTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ final class NTPClient {
let data = data, let PDU = try? NTPPacket(data: data, destinationTime: destinationTime),
PDU.isValidResponse() else
{
print("nil")
completion(nil)
return
}

print(PDU)
completion(PDU)
}

Expand Down
1 change: 0 additions & 1 deletion Tests/KronosTests/NTPClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ final class NTPClientTests: XCTestCase {
XCTAssertGreaterThan(addresses.count, 0)

NTPClient().query(ip: addresses.first!, version: 3, numberOfSamples: 1) { PDU in
print(Thread.callStackSymbols)
XCTAssertNotNil(PDU)

XCTAssertGreaterThanOrEqual(PDU!.version, 3)
Expand Down

0 comments on commit b4c1bd5

Please sign in to comment.