tls-socket: Don't fail reading if sending data failed
If data is processed that eventually includes a TLS close notify, build() will fail after a close notify has been sent in turn. However, propagating that error immediately when reading prevented ever returning the data already processed before the close notify was received.
This commit is contained in:
@@ -188,7 +188,11 @@ static bool exchange(private_tls_socket_t *this, bool wr, bool block)
|
||||
case SUCCESS:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
if (wr)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user