File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ final class MQTTErrorHandler: ChannelInboundHandler {
20
20
}
21
21
22
22
func errorCaught( context: ChannelHandlerContext , error: Error ) {
23
- #if canImport(NIOSSL)
23
+ // This should use `canImport(NIOSSL)`, will change when it works with SwiftUI previews.
24
+ #if os(macOS) || os(Linux)
24
25
// We ignore unclean shutdowns, which could be caused by servers not sending `close_notify`
25
26
if let sslError = error as? NIOSSLError , case . uncleanShutdown = sslError {
26
27
return
Original file line number Diff line number Diff line change @@ -541,7 +541,8 @@ extension MQTTConfiguration {
541
541
}
542
542
}
543
543
544
- #if canImport(NIOSSL)
544
+ // This should use `canImport(NIOSSL)`, will change when it works with SwiftUI previews.
545
+ #if os(macOS) || os(Linux)
545
546
extension MQTTConfiguration {
546
547
/// Creates an `MQTTConfiguration`.
547
548
/// - Parameters:
Original file line number Diff line number Diff line change @@ -117,7 +117,8 @@ class MQTTNIOTestCase: XCTestCase {
117
117
) , eventLoopGroupProvider: . shared( tlsGroup) )
118
118
}
119
119
120
- #if canImport(NIOSSL)
120
+ // This should use `canImport(NIOSSL)`, will change when it works with SwiftUI previews.
121
+ #if os(macOS) || os(Linux)
121
122
var nioSSLTLSClient : MQTTClient {
122
123
get throws {
123
124
let rootDir = URL ( fileURLWithPath: #file)
You can’t perform that action at this time.
0 commit comments