mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Try to cope with failure of remote end to respond to tls shutdown.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37417 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ce7b612350
commit
fab72a3218
5 changed files with 50 additions and 26 deletions
|
@ -366,24 +366,26 @@ static GSTcpTune *tune = nil;
|
|||
[self ignoreReadDescriptor];
|
||||
[self ignoreWriteDescriptor];
|
||||
|
||||
#if USE_ZLIB
|
||||
/*
|
||||
* The gzDescriptor should always be closed when we have done with it.
|
||||
*/
|
||||
if (gzDescriptor != 0)
|
||||
if (closeOnDealloc == YES && descriptor != -1)
|
||||
{
|
||||
gzclose(gzDescriptor);
|
||||
gzDescriptor = 0;
|
||||
[self closeFile];
|
||||
}
|
||||
#endif
|
||||
if (descriptor != -1)
|
||||
else
|
||||
{
|
||||
[self setNonBlocking: wasNonBlocking];
|
||||
if (closeOnDealloc == YES)
|
||||
{
|
||||
close(descriptor);
|
||||
descriptor = -1;
|
||||
}
|
||||
#if USE_ZLIB
|
||||
/*
|
||||
* The gzDescriptor should always be closed when we have done with it.
|
||||
*/
|
||||
if (gzDescriptor != 0)
|
||||
{
|
||||
gzclose(gzDescriptor);
|
||||
gzDescriptor = 0;
|
||||
}
|
||||
#endif
|
||||
if (descriptor != -1)
|
||||
{
|
||||
[self setNonBlocking: wasNonBlocking];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue