mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix looping session startup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38386 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1fdfbc8b46
commit
89ae58eb4c
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2015-03-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSFileHandle.m: ([-sslHandshakeEstablished:outgoing:])
|
||||
If we can't create a session, the handshake should fail rather
|
||||
than being retried. Fix infinite loop establish session on closed
|
||||
handle.
|
||||
|
||||
2015-02-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/GNUstepBase/NSDebug+GNUstepBase.h:
|
||||
|
|
|
@ -1001,12 +1001,14 @@ GSTLSHandlePush(gnutls_transport_ptr_t handle, const void *buffer, size_t len)
|
|||
|
||||
if (YES == [session active])
|
||||
{
|
||||
*result = YES;
|
||||
return YES; /* Already connected. */
|
||||
}
|
||||
|
||||
if (YES == isStandardFile)
|
||||
{
|
||||
NSLog(@"Attempt to perform ssl handshake with a standard file");
|
||||
*result = NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -1046,6 +1048,11 @@ GSTLSHandlePush(gnutls_transport_ptr_t handle, const void *buffer, size_t len)
|
|||
|
||||
if (NO == [session handshake])
|
||||
{
|
||||
*result = NO;
|
||||
if (nil == session)
|
||||
{
|
||||
return YES; // Unable to create session
|
||||
}
|
||||
return NO; // Need more.
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue