From 8fc01a1a790a6b09f9e09e80385b5bdf70ecbd72 Mon Sep 17 00:00:00 2001 From: Greg Galloway Date: Thu, 9 Apr 2020 10:26:50 -0400 Subject: [PATCH] Fix retain cycle --- Sources/Socket/Socket.swift | 2 +- Sources/Socket/SocketProtocols.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Socket/Socket.swift b/Sources/Socket/Socket.swift index b46f715..4ce03c1 100644 --- a/Sources/Socket/Socket.swift +++ b/Sources/Socket/Socket.swift @@ -844,7 +844,7 @@ public class Socket: SocketReader, SocketWriter { /// /// The delegate that provides the SSL implementation. /// - public var delegate: SSLServiceDelegate? = nil { + public weak var delegate: SSLServiceDelegate? = nil { didSet { diff --git a/Sources/Socket/SocketProtocols.swift b/Sources/Socket/SocketProtocols.swift index e718529..7e3a307 100644 --- a/Sources/Socket/SocketProtocols.swift +++ b/Sources/Socket/SocketProtocols.swift @@ -87,7 +87,7 @@ public protocol SocketWriter { /// /// SSL Service Delegate Protocol /// -public protocol SSLServiceDelegate { +public protocol SSLServiceDelegate : class { /// /// Initialize SSL Service