mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 09:40:30 +00:00
control_socked: fix early module_done
The thread is not joined yet so it may access the module data (check_message). This might have caused this failure: <https://gist.github.com/MartinPulec/8d855d67d4333c8806126814607dcce9>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @author Martin Pulec <pulec@cesnet.cz>
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2013-2025 CESNET
|
||||
* Copyright (c) 2013-2026 CESNET, zájmové sdružení právnických osob
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -976,8 +976,6 @@ void control_done(struct control_state *s)
|
||||
}
|
||||
assert(s->magic == MODULE_MAGIC);
|
||||
|
||||
module_done(&s->mod);
|
||||
|
||||
if(s->started) {
|
||||
s->stats_lock.lock();
|
||||
s->stat_event_queue.push({});
|
||||
@@ -999,6 +997,8 @@ void control_done(struct control_state *s)
|
||||
CLOSESOCKET(s->socket_fd);
|
||||
}
|
||||
|
||||
module_done(&s->mod);
|
||||
|
||||
delete s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user