mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +00:00
DevIo.pm: fix nonblocking SSL connections (Forum #126011)
git-svn-id: https://svn.fhem.de/fhem/trunk@25636 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
86ad09f807
commit
c34bb3f6e7
@ -79,6 +79,13 @@ DevIo_SimpleRead($)
|
||||
my ($hash) = @_;
|
||||
my $buf = DevIo_DoSimpleRead($hash);
|
||||
|
||||
if(length($buf) == 0 && $! == EWOULDBLOCK && $hash->{SSL} && $hash->{TCPDev}) {
|
||||
my $es = $hash->{TCPDev}->errstr;
|
||||
$hash->{wantWrite} = 1 if($es == &IO::Socket::SSL::SSL_WANT_WRITE);
|
||||
$hash->{wantRead} = 1 if($es == &IO::Socket::SSL::SSL_WANT_READ);
|
||||
return "";
|
||||
}
|
||||
|
||||
###########
|
||||
# Lets' try again: Some drivers return len(0) on the first read...
|
||||
if(defined($buf) && length($buf) == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user