Skip to content

Commit 963ca8a

Browse files
committed
[SMCE] Fix operations ordering
Signed-off-by: AeroStun <24841307+AeroStun@users.noreply.github.com>
1 parent 94323cf commit 963ca8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SMCE/Board.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ void Board::tick() noexcept {
104104
case Status::suspended: {
105105
auto& in = *m_internal;
106106
if (!in.sketch.running()) {
107+
const auto exit_code = m_internal->sketch.exit_code();
107108
do_sweep();
108109
m_status = Status::stopped;
109110
if (m_exit_notify)
110-
m_exit_notify(m_internal->sketch.exit_code());
111+
m_exit_notify(exit_code);
111112
}
112113
}
113114
default:
@@ -295,6 +296,7 @@ void Board::do_reap() noexcept {
295296
if(in.sketch_log_grabber.joinable()) {
296297
#if BOOST_OS_LINUX
297298
::pthread_cancel(in.sketch_log_grabber.native_handle());
299+
in.sketch_log.pipe().close();
298300
#endif
299301
in.sketch_log_grabber.join();
300302
}

0 commit comments

Comments
 (0)