mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
attempt to fix possible problem with early release of ostream
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38017 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ea3c5330c4
commit
bac39eafec
1 changed files with 6 additions and 0 deletions
|
@ -647,6 +647,12 @@ static NSArray *keys = nil;
|
||||||
{
|
{
|
||||||
NSDebugMLLog(@"NSStream",
|
NSDebugMLLog(@"NSStream",
|
||||||
@"GSTLSHandler completed on %p", stream);
|
@"GSTLSHandler completed on %p", stream);
|
||||||
|
|
||||||
|
/* Make sure that, if ostream gets released as a result of
|
||||||
|
* the event we send to istream, it doesn't get deallocated
|
||||||
|
* and cause a crash when we try to send to it.
|
||||||
|
*/
|
||||||
|
AUTORELEASE(RETAIN(ostream));
|
||||||
if ([istream streamStatus] == NSStreamStatusOpen)
|
if ([istream streamStatus] == NSStreamStatusOpen)
|
||||||
{
|
{
|
||||||
[istream _resetEvents: NSStreamEventOpenCompleted];
|
[istream _resetEvents: NSStreamEventOpenCompleted];
|
||||||
|
|
Loading…
Reference in a new issue