simplified with one hunk of code instead of two

This commit is contained in:
Sergei Golovin 2024-03-07 15:02:53 +04:00
parent 9cb56a03a0
commit 30a8cfd2b9

View file

@ -179,7 +179,8 @@
ASSIGN(_cfh, fh);
[_fh acceptConnectionInBackgroundAndNotify];
if (_isSecure && [_cfh sslAccept])
if (!_isSecure || (_isSecure && [_cfh sslAccept]))
{
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(_read:)
@ -188,14 +189,6 @@
[_cfh readInBackgroundAndNotify];
}
else
{
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(_read:)
name: NSFileHandleReadCompletionNotification
object: _cfh];
[_cfh readInBackgroundAndNotify];
}
}
}