diff options
author | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2024-07-19 10:50:06 +0100 |
---|---|---|
committer | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2024-07-19 10:50:06 +0100 |
commit | 6ab97d2dfe563c2c43c2519b2e6f22494572045c (patch) | |
tree | 785e403b6804960fbf52fe64f11aeedf50a05f7c /Net1090 | |
parent | b32ecfab276fb8e1dff0e1d72ed819b548323328 (diff) | |
download | ADSBDecoder-6ab97d2dfe563c2c43c2519b2e6f22494572045c.tar.gz ADSBDecoder-6ab97d2dfe563c2c43c2519b2e6f22494572045c.zip |
Add network configuration windows in LearnMapKit
Diffstat (limited to 'Net1090')
-rw-r--r-- | Net1090/main.swift | 9 |
1 files changed, 8 insertions, 1 deletions
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") } } |