From 57fbaee929a5119ea21a928dff928d358565798a Mon Sep 17 00:00:00 2001 From: James Van Noord Date: Mon, 1 Apr 2019 11:03:36 -0700 Subject: [PATCH] fix circular reference when using WebSocketDelegate --- Source/WebSocket.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebSocket.swift b/Source/WebSocket.swift index eb6ff93..1947411 100644 --- a/Source/WebSocket.swift +++ b/Source/WebSocket.swift @@ -536,7 +536,7 @@ private class InnerWebSocket: Hashable { var _allowSelfSignedSSL = false var _services = WebSocketService.None var _event = WebSocketEvents() - var _eventDelegate: WebSocketDelegate? + weak var _eventDelegate: WebSocketDelegate? var _binaryType = WebSocketBinaryType.uInt8Array var _readyState = WebSocketReadyState.connecting var _networkTimeout = TimeInterval(-1)