| 747 | } |
| 748 | |
| 749 | void StopLuxControl() |
| 750 | { |
| 751 | // timed_join() avoids the wallet not closing during a repair-restart. For a 'normal' wallet exit |
| 752 | // it behaves for our cases exactly like the normal join() |
| 753 | if (gBase) { |
| 754 | #if BOOST_VERSION >= 105000 |
| 755 | luxControlThread.try_join_for(boost::chrono::seconds(1)); |
| 756 | #else |
| 757 | luxControlThread.timed_join(boost::posix_time::seconds(1)); |
| 758 | #endif |
| 759 | event_base_free(gBase); |
| 760 | gBase = 0; |
| 761 | } |
| 762 | } |