summaryrefslogtreecommitdiff
path: root/Net1090
diff options
context:
space:
mode:
Diffstat (limited to 'Net1090')
-rw-r--r--Net1090/main.swift9
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")
}
}