mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 14:39:10 +00:00
SecureTransport: handle graceful closes
On close, we might get a return code which looks like an error but just means that the other side closed gracefully. Handle that.
This commit is contained in:
parent
65ac7ddccc
commit
44b769e497
@ -19,7 +19,7 @@ int stransport_error(OSStatus ret)
|
||||
{
|
||||
CFStringRef message;
|
||||
|
||||
if (ret == noErr) {
|
||||
if (ret == noErr || ret == errSSLClosedGraceful) {
|
||||
giterr_clear();
|
||||
return 0;
|
||||
}
|
||||
@ -183,7 +183,8 @@ int stransport_close(git_stream *stream)
|
||||
stransport_stream *st = (stransport_stream *) stream;
|
||||
OSStatus ret;
|
||||
|
||||
if ((ret = SSLClose(st->ctx)) != noErr)
|
||||
ret = SSLClose(st->ctx);
|
||||
if (ret != noErr && ret != errSSLClosedGraceful)
|
||||
return stransport_error(ret);
|
||||
|
||||
return git_stream_close(st->io);
|
||||
|
Loading…
Reference in New Issue
Block a user