diff --git a/fhem/FHEM/TcpServerUtils.pm b/fhem/FHEM/TcpServerUtils.pm index 89f5a9f5c..86ff38d2c 100644 --- a/fhem/FHEM/TcpServerUtils.pm +++ b/fhem/FHEM/TcpServerUtils.pm @@ -111,14 +111,17 @@ TcpServer_Accept($$) # Certs directory must be in the modpath, i.e. at the same level as the # FHEM directory my $mp = AttrVal("global", "modpath", "."); - my $ret = IO::Socket::SSL->start_SSL($clientinfo[0], { - SSL_server => 1, - SSL_key_file => "$mp/certs/server-key.pem", - SSL_cert_file => "$mp/certs/server-cert.pem", - SSL_version => $sslVersion, - SSL_cipher_list => 'HIGH:!RC4:!eNULL:!aNULL', - Timeout => 4, - }); + my $ret; + eval { + $ret = IO::Socket::SSL->start_SSL($clientinfo[0], { + SSL_server => 1, + SSL_key_file => "$mp/certs/server-key.pem", + SSL_cert_file => "$mp/certs/server-cert.pem", + SSL_version => $sslVersion, + SSL_cipher_list => 'HIGH:!RC4:!eNULL:!aNULL', + Timeout => 4, + }); + }; my $err = $!; if( !$ret && $err != EWOULDBLOCK