From 8107ae2c93338945dedb71f06f5fafcc4dbdf1ae Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Thu, 31 Mar 2022 13:01:06 +0000 Subject: [PATCH] 82_LGTV_WebOS: Close socket then catch exception git-svn-id: https://svn.fhem.de/fhem/trunk@25902 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/lib/FHEM/Devices/LGTV/LGTVWebOS.pm | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 31eb51837..471c4a6c8 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 82_LGTV_WebOS: Close socket then catch exception - bugfix: 82_LGTV_WebOS: fix crash in filehandle - bugfix: 89_AndroidDB: Fixed bug in attribute createReadings - feature: 89_AndroidDB: Added creation of readings for shell commands diff --git a/fhem/lib/FHEM/Devices/LGTV/LGTVWebOS.pm b/fhem/lib/FHEM/Devices/LGTV/LGTVWebOS.pm index b8d5308fe..92c31840b 100644 --- a/fhem/lib/FHEM/Devices/LGTV/LGTVWebOS.pm +++ b/fhem/lib/FHEM/Devices/LGTV/LGTVWebOS.pm @@ -710,9 +710,11 @@ sub Write { } catch { if ( $_->isa('autodie::exception') && $_->matches(':io') ) { - ::Log3( $name, 2, + ::Log3( $name, 4, "LGTV_WebOS ($name) - can't write to socket, autodie exception: $_" ); + + Close($hash); return; } else { @@ -759,9 +761,11 @@ sub Read { } catch { if ( $_->isa('autodie::exception') && $_->matches(':io') ) { - ::Log3( $name, 2, + ::Log3( $name, 4, "LGTV_WebOS ($name) - can't read from socket, autodie exception: $_" ); + + Close($hash); return; } else {