Skip to content

Commit 9b6b199

Browse files
committed
isListening public API
1 parent 4f7e628 commit 9b6b199

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

FlyingFox/Sources/HTTPServer+Listening.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import FlyingSocks
3535

3636
extension HTTPServer {
3737

38+
public var isListening: Bool { state != nil }
39+
3840
public func waitUntilListening(timeout: TimeInterval = 5) async throws {
3941
try await withThrowingTimeout(seconds: timeout) {
4042
try await self.doWaitUntilListening()

FlyingFox/Sources/HTTPServer.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public final actor HTTPServer {
9292
}
9393
}
9494

95-
var isListening: Bool { state != nil }
9695
var waiting: Set<Continuation> = []
9796
private(set) var state: (socket: Socket, task: Task<Void, Error>)? {
9897
didSet { isListeningDidUpdate(from: oldValue != nil ) }

0 commit comments

Comments
 (0)