Skip to content

Commit

Permalink
by default, don't log the backtrace for socket timeouts
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@23624 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 29, 2019
1 parent d5e51ac commit 5471fcc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/xpra/net/bytestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
SSL_PEEK = envbool("XPRA_SSL_PEEK", True)
#this is more proper but would break the proxy server:
SOCKET_SHUTDOWN = envbool("XPRA_SOCKET_SHUTDOWN", False)
LOG_TIMEOUTS = envint("XPRA_LOG_TIMEOUTS", 1)

#on some platforms (ie: OpenBSD), reading and writing from sockets
#raises an IOError but we should continue if the error code is EINTR
Expand Down Expand Up @@ -116,8 +117,9 @@ def untilConcludes(is_active_cb, can_retry_cb, f, *a, **kw):
return f(*a, **kw)
except Exception as e:
retry = can_retry_cb(e)
log("untilConcludes(%s, %s, %s, %s, %s) %s, retry=%s",
is_active_cb, can_retry_cb, f, a, kw, e, retry, exc_info=True)
if LOG_TIMEOUTS>0:
log("untilConcludes(%s, %s, %s, %s, %s) %s, retry=%s",
is_active_cb, can_retry_cb, f, a, kw, e, retry, exc_info=LOG_TIMEOUTS>=2)
e = None
if not retry:
raise
Expand Down

0 comments on commit 5471fcc

Please sign in to comment.