From 6ab97d2dfe563c2c43c2519b2e6f22494572045c Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Fri, 19 Jul 2024 10:50:06 +0100 Subject: Add network configuration windows in LearnMapKit --- Net1090/main.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Net1090') diff --git a/Net1090/main.swift b/Net1090/main.swift index 93ff716..04d0384 100644 --- a/Net1090/main.swift +++ b/Net1090/main.swift @@ -9,6 +9,7 @@ import Foundation import Network import NIO + class ADSBHandlder: ChannelInboundHandler { typealias InboundIn = ByteBuffer typealias OutboundOut = ByteBuffer @@ -58,7 +59,13 @@ class TCPClient { } func stop() { - + do { + try group.syncShutdownGracefully() + } catch let error { + print("Error shutting down \(error.localizedDescription)") + exit(0) + } + print("Connection closed") } } -- cgit v1.2.3