From 0229138bd5947410c3c0ef8dfac3cf57e537cf78 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Mon, 19 Sep 2022 13:44:14 -0400 Subject: [PATCH] Fixed wait delay for IP command (#250) I initially wanted a one-second wait but made a human mistake. Fixes #249 --- Sources/tart/Commands/IP.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/tart/Commands/IP.swift b/Sources/tart/Commands/IP.swift index 89ba76c..23ffa54 100644 --- a/Sources/tart/Commands/IP.swift +++ b/Sources/tart/Commands/IP.swift @@ -47,8 +47,9 @@ struct IP: AsyncParsableCommand { if let ip = try Leases().resolveMACAddress(macAddress: vmMACAddress) { return ip } - - try await Task.sleep(nanoseconds: 1_000_000) + + // wait a second + try await Task.sleep(nanoseconds: 1_000_000_000) } while Date.now < waitUntil return nil