Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Do
-
0.7
-
None
-
iOS 4.3
-
Patch Available
Description
The socket setup code in TSocketClient seems to have been copied blindly from Apple's docs. The two problems with that are:
(a) The example is for non-blocking event-based network IO, but Thrift uses it in blocking mode and does not handle the delegate events it registers for. This causes network operations to randomly hang.
(b) It retains the input and output streams, which already have a retain count of 1, and which are then retained again by the superclass, causing a memory leak.