From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.1.2] (unknown [101.128.125.209]) by gnuweeb.org (Postfix) with ESMTPSA id 38C337E24F; Sat, 24 Dec 2022 22:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1671922770; bh=AV4y7CzhB52jpPMqOldHETwl00Rxkv1Brbqso/EEoSo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=X9GYE7UvQe+StzfXAcH9twk46TXUzmwz+tfqr7YwMH5ke6XB3AsCACzoDzhxtSaTP PHP3p/6iHY7tpxXLYy//l5WNTTPiMfvveGEOzzyDFzIg42dKheJ/xPkV0icleGJmS9 +p2DhI79+CHgGOBlx47nXAzg/gVOBcNj8SqNqqegmrEXxkeBvZo4KOFAHVDR4+u1G0 AMrap8H15aqjOBEugW9II57nMWASrv1NFhNcZTBEnZEVp7OYnOq9jedUekdQhBoumZ AbITiXTbi/+pRvEnaXIu6ndM/Vj2apv9syj8i3q4PL7rbIrD8cu5GxsSwziwywoZWk JtKrZDCQPDXPg== Message-ID: <24eedb21-5ffa-5d66-8c0a-0883c9c82e54@gnuweeb.org> Date: Sun, 25 Dec 2022 05:59:25 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v1 1/2] telegram: listener: Fix missing MySQL error recovery function Content-Language: en-US To: Ammar Faizi , GNU/Weeb Mailing List Cc: Alviro Iskandar Setiawan References: <20221224220008.258335-1-ammarfaizi2@gnuweeb.org> <20221224220008.258335-2-ammarfaizi2@gnuweeb.org> From: Muhammad Rizki In-Reply-To: <20221224220008.258335-2-ammarfaizi2@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 25/12/2022 05.00, Ammar Faizi wrote: > From: Ammar Faizi > > When I restarted the MySQL server, the program kept looping in the > report function, reporting the same error: > > "Lost connection to MySQL server during query" > > This happened because commit ce17f3e8016c ("telegram: Implement the log > message for catching errors") added an error logging using a 'try and > except' statement. This statement effectively kills the MySQL recovery > function that the caller ('__run' function) provides. > > Create a new function wrapper, report_err(). Also, make sure the MySQL > error recovery function is called. > > Fixes: ce17f3e8016c ("telegram: Implement the log message for catching errors") > Signed-off-by: Ammar Faizi > --- I will test this later, thanks.