[cpp-sp] branch master updated: Guard logging with check for reset conn.
Scott Cantor
cantor.2 at osu.edu
Fri Apr 27 16:50:39 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=bfbd598929ca4c1f8f99fb97bd8024909549850a
The following commit(s) were added to refs/heads/master by this push:
new bfbd598 Guard logging with check for reset conn.
bfbd598 is described below
commit bfbd598929ca4c1f8f99fb97bd8024909549850a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Apr 27 16:50:35 2018 -0400
Guard logging with check for reset conn.
---
shibsp/remoting/impl/SocketListener.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/shibsp/remoting/impl/SocketListener.cpp b/shibsp/remoting/impl/SocketListener.cpp
index 51dfd0c..d6f3145 100644
--- a/shibsp/remoting/impl/SocketListener.cpp
+++ b/shibsp/remoting/impl/SocketListener.cpp
@@ -395,6 +395,10 @@ bool SocketListener::log_error(const char* fn) const
fn = "unknown";
#ifdef WIN32
int rc=WSAGetLastError();
+ if (rc == WSAECONNRESET) {
+ log->debug("socket connection reset");
+ return false;
+ }
#else
int rc=errno;
#endif
@@ -402,11 +406,10 @@ bool SocketListener::log_error(const char* fn) const
char buf[256];
memset(buf,0,sizeof(buf));
strerror_r(rc,buf,sizeof(buf));
- log->error("socket call (%s) resulted in error (%d): %s",fn, rc, isprint(*buf) ? buf : "no message");
#else
const char* buf=strerror(rc);
- log->error("socket call (%s) resulted in error (%d): %s", fn, rc, isprint(*buf) ? buf : "no message");
#endif
+ log->error("failed socket call (%s), result (%d): %s", fn, rc, isprint(*buf) ? buf : "no message");
return false;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list