Skip to content

Commit

Permalink
My boss forced me to build this feature... Pure shit.
Browse files Browse the repository at this point in the history
  • Loading branch information
sberrevoets committed Mar 21, 2024
1 parent fa98ec3 commit 5a272b2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Sources/NTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ final class NTPClient {
{
var timer: Timer?
let bridgeCallback: ObjCCompletionType = { data, destinationTime in
print("wat")
defer {
// If we still have samples left; we'll keep querying the same server
if numberOfSamples > 1 {
Expand All @@ -95,13 +94,10 @@ final class NTPClient {
let data = data, let PDU = try? NTPPacket(data: data, destinationTime: destinationTime),
PDU.isValidResponse() else
{
print("nil")
print(String(describing: data))
completion(nil)
return
}

print(PDU)
completion(PDU)
}

Expand Down Expand Up @@ -154,6 +150,7 @@ final class NTPClient {
signal(SIGPIPE, SIG_IGN)

let callback: CFSocketCallBack = { socket, callbackType, _, data, info in
print(data)
if callbackType == .writeCallBack {
var packet = NTPPacket()
let PDU = packet.prepareToSend() as CFData
Expand Down

0 comments on commit 5a272b2

Please sign in to comment.