Fix stream not closing properly when exiting app

This commit is contained in:
loki
2020-04-16 15:35:12 +02:00
parent 0b1a69a067
commit c7d6e959e0
3 changed files with 6 additions and 3 deletions

View File

@@ -160,7 +160,7 @@ struct x11_attr_t : public display_t {
if(width != xattr.width || height != xattr.height) { if(width != xattr.width || height != xattr.height) {
return capture_e::reinit; return capture_e::reinit;
} }
XImage *img { XGetImage( XImage *img { XGetImage(
xdisplay.get(), xdisplay.get(),
xwindow, xwindow,

0
sunshine/round_robin.h Executable file → Normal file
View File

View File

@@ -494,8 +494,11 @@ void controlBroadcastThread(safe::signal_t *shutdown_event, control_server_t *se
server->send(std::string_view {(char*)payload.data(), payload.size()}); server->send(std::string_view {(char*)payload.data(), payload.size()});
shutdown_event->raise(true); auto lg = server->_map_addr_session.lock();
continue; for(auto pos = std::begin(*server->_map_addr_session); pos != std::end(*server->_map_addr_session); ++pos) {
auto session = pos->second.second;
session->shutdown_event.raise(true);
}
} }
server->iterate(500ms); server->iterate(500ms);