aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy')
-rw-r--r--libmproxy/controller.py1
-rw-r--r--libmproxy/proxy.py2
-rw-r--r--libmproxy/script.py2
3 files changed, 4 insertions, 1 deletions
diff --git a/libmproxy/controller.py b/libmproxy/controller.py
index b662b6d5..470d88fc 100644
--- a/libmproxy/controller.py
+++ b/libmproxy/controller.py
@@ -72,6 +72,7 @@ class Slave(threading.Thread):
self.channel, self.server = channel, server
self.server.set_channel(channel)
threading.Thread.__init__(self)
+ self.name = "SlaveThread (%s:%s)" % (self.server.address.host, self.server.address.port)
def run(self):
self.server.serve_forever()
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 8bd93122..5526e102 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -185,6 +185,8 @@ from .protocol.http import HTTPResponse
class RequestReplayThread(threading.Thread):
+ name="RequestReplayThread"
+
def __init__(self, config, flow, masterq):
self.config, self.flow, self.channel = config, flow, controller.Channel(masterq)
threading.Thread.__init__(self)
diff --git a/libmproxy/script.py b/libmproxy/script.py
index 0912c9ae..d34d3383 100644
--- a/libmproxy/script.py
+++ b/libmproxy/script.py
@@ -108,7 +108,7 @@ def _handle_concurrent_reply(fn, o, args=[], kwargs={}):
def run():
fn(*args, **kwargs)
reply(o)
- threading.Thread(target=run).start()
+ threading.Thread(target=run, name="ScriptThread").start()
def concurrent(fn):