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:
rudolfkoenig
2020-10-26 20:31:42 +00:00
parent ffaa2018e6
commit 991aad0dbd

View File

@@ -292,7 +292,7 @@ telnet_Output($$$)
{
my ($hash,$ret,$nonl) = @_;
if($ret) {
if($ret && defined($hash->{CD})) {
$ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" );
if(!$nonl) { # AsyncOutput stuff
$ret = "\n$ret\n$hash->{prompt} " if( $hash->{showPrompt});