Close Socket then catch excepstion
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user