Skip to content

Commit 19ffd8f

Browse files
committed
Bug fix for issue robbiehanson#66 - Will leak SSLContexts on iOS because SSLContext is a Core Foundation type
1 parent cba9da6 commit 19ffd8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GCD/GCDAsyncSocket.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,8 +2673,9 @@ - (void)closeWithError:(NSError *)error
26732673

26742674
SSLClose(sslContext);
26752675

2676-
#if !TARGET_OS_IPHONE
2677-
// SSLDisposeContext doesn't exist in iOS for some odd reason.
2676+
#if TARGET_OS_IPHONE
2677+
CFRelease(sslContext);
2678+
#else
26782679
SSLDisposeContext(sslContext);
26792680
#endif
26802681

0 commit comments

Comments
 (0)