diff options
author | Benoit Foucher <benoit@zeroc.com> | 2019-01-10 08:46:36 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-01-10 08:48:27 +0100 |
commit | fed19af48eb554716683b30294dd02081e1e51d1 (patch) | |
tree | 76eea09a85536560196271bd064c6f213720039f /cpp/src/Ice/Selector.cpp | |
parent | CHANGELOG review and update (diff) | |
download | ice-fed19af48eb554716683b30294dd02081e1e51d1.tar.bz2 ice-fed19af48eb554716683b30294dd02081e1e51d1.tar.xz ice-fed19af48eb554716683b30294dd02081e1e51d1.zip |
Workaround for iOS simulator spurious crashes on shutdown
Diffstat (limited to 'cpp/src/Ice/Selector.cpp')
-rw-r--r-- | cpp/src/Ice/Selector.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp index ff25ccc4edf..d210dd9891c 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -1046,6 +1046,16 @@ public: virtual void run() { _selector.run(); + +#if TARGET_IPHONE_SIMULATOR != 0 + // + // Workaround for CFSocket bug where the CFSocketManager thread crashes if an + // invalidated socket is being processed for reads/writes. We add this sleep + // mostly to prevent spurious crashes with testing. This bug is very unlikely + // to be hit otherwise. + // + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(100)); +#endif } private: |