Merge pull request #4880 from Alexays/copilot/fix-mpd-module-crash
mpd: fix socket FD leak on system-level connection errors
This commit is contained in:
@ -323,6 +323,7 @@ void waybar::modules::MPD::checkErrors(mpd_connection* conn) {
|
||||
case MPD_ERROR_SYSTEM:
|
||||
if (auto ec = mpd_connection_get_system_error(conn); ec != 0) {
|
||||
mpd_connection_clear_error(conn);
|
||||
connection_.reset();
|
||||
throw std::system_error(ec, std::system_category());
|
||||
}
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
Reference in New Issue
Block a user