From 31009bb1f6052fb3c6a41e3a97fdf09405cd577d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 16 Aug 2012 00:29:10 +0200 Subject: ProxyDatabase: clear libmpdclient errors in CheckError() Auto-recover from soft errors. --- src/db/ProxyDatabasePlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/db/ProxyDatabasePlugin.cxx') diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index e27ca8291..5604daf10 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -120,7 +120,7 @@ Convert(enum tag_type tag_type) } static bool -CheckError(const struct mpd_connection *connection, GError **error_r) +CheckError(struct mpd_connection *connection, GError **error_r) { const auto error = mpd_connection_get_error(connection); if (error == MPD_ERROR_SUCCESS) @@ -128,6 +128,7 @@ CheckError(const struct mpd_connection *connection, GError **error_r) g_set_error_literal(error_r, libmpdclient_quark(), (int)error, mpd_connection_get_error_message(connection)); + mpd_connection_clear_error(connection); return false; } -- cgit v1.2.3