Skip to content

Commit

Permalink
better TCP socket debug logging (esp for IPv6)
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@15653 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 17, 2017
1 parent cbf903f commit 416dfa5
Show file tree
Hide file tree
Showing 2 changed files with 5 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 @@ -142,8 +142,10 @@ def untilConcludes(is_active_cb, f, *a, **kw):

def pretty_socket(s):
try:
assert len(s)==2
return "%s:%s" % (s[0], s[1])
if len(s)==2:
return "%s:%s" % (s[0], s[1])
assert len(s)==4
return ", ".join(str(x) for x in s)
except:
return str(s)

Expand Down
1 change: 1 addition & 0 deletions src/xpra/scripts/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def setup_tcp_socket(host, iport, socktype="TCP"):
try:
tcp_socket = create_tcp_socket(host, iport)
except Exception as e:
log("create_tcp_socket%s", (host, iport), exc_info=True)
raise InitException("failed to setup %s socket on %s:%s %s" % (socktype, host, iport, e))
def cleanup_tcp_socket():
log.info("closing %s socket %s:%s", socktype, host, iport)
Expand Down

0 comments on commit 416dfa5

Please sign in to comment.