mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_telnet.pm: avoid crash if async output channel is closed
git-svn-id: https://svn.fhem.de/fhem/trunk@23035 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f9dbaf6455
commit
53dbe57e9c
@ -292,7 +292,7 @@ telnet_Output($$$)
|
|||||||
{
|
{
|
||||||
my ($hash,$ret,$nonl) = @_;
|
my ($hash,$ret,$nonl) = @_;
|
||||||
|
|
||||||
if($ret) {
|
if($ret && defined($hash->{CD})) {
|
||||||
$ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" );
|
$ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" );
|
||||||
if(!$nonl) { # AsyncOutput stuff
|
if(!$nonl) { # AsyncOutput stuff
|
||||||
$ret = "\n$ret\n$hash->{prompt} " if( $hash->{showPrompt});
|
$ret = "\n$ret\n$hash->{prompt} " if( $hash->{showPrompt});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user