Files
react-native/Libraries
zhongwuzw dd209bb789 Fix crash for web socket in some race conditions (#22439)
Summary:
Fixes #21086.
Fixes #6117.

This PR fixes a crash caused by a race condition when `webSocket` deallocated and `NSStream` delegate callback, because `NSStream`'s delegate callback be called on `RCTSR_networkRunLoop`.

This PR mainly changes:

* Remove unnecessary `nil` operation in `dealloc` method.
* Add a new method `_scheduleCleanUp` to schedule `webSocket` cleanup also on `RCTSR_networkRunLoop`.
* In `stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode` delegate method, add a `wself` to make safe further.
Pull Request resolved: https://github.com/facebook/react-native/pull/22439

Differential Revision: D13564247

Pulled By: cpojer

fbshipit-source-id: 675c1b2805aa45c54d7708d796f5843ef7ea34e2
2019-01-01 17:55:29 -08:00
..
2018-12-11 20:01:00 -08:00
2018-12-04 19:32:36 -08:00
2019-01-01 17:13:15 -08:00
2018-12-11 20:01:00 -08:00
2018-10-31 01:37:26 -07:00
2018-12-11 20:01:00 -08:00
2018-10-31 01:37:26 -07:00
2018-12-11 20:01:00 -08:00
2018-12-14 13:57:50 -08:00
2018-09-27 14:18:31 -07:00
2018-12-14 13:57:50 -08:00
2018-11-26 06:28:24 -08:00