diff options
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: |