netrpc: names at client threads

Have a name for client threads, too.

bzr revid: p_christ@hol.gr-20100726093336-8me0gn4gvexuzk5r
This commit is contained in:
P. Christeas
2010-07-26 12:33:36 +03:00
parent 522df9e236
commit 4c6baedf13
+3 -1
View File
@@ -36,7 +36,9 @@ import tools
class TinySocketClientThread(threading.Thread, netsvc.OpenERPDispatcher):
def __init__(self, sock, threads):
threading.Thread.__init__(self)
spn = sock and sock.getpeername()
spn = 'netrpc-client-%s:%s' % spn[0:2]
threading.Thread.__init__(self, name=spn)
self.sock = sock
# Only at the server side, use a big timeout: close the
# clients connection when they're idle for 20min.