diff --git a/Sources/Peasy/Server.swift b/Sources/Peasy/Server.swift index 020d9f0..b63f6d7 100644 --- a/Sources/Peasy/Server.swift +++ b/Sources/Peasy/Server.swift @@ -24,6 +24,13 @@ public final class Server { // MARK: Public public init() {} + + deinit { + switch state { + case .running: stop() + case .notRunning: break + } + } // MARK: - Functions - // MARK: Public