Thread names for IPv6

Thread names for IPv6 contained ":". This caused problems in log
parsers.
This commit is contained in:
mailchuck 2016-01-26 11:54:11 +01:00 committed by Peter Surda
parent 89752faceb
commit 47f1c0c267
3 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class outgoingSynSender(threading.Thread, StoppableThread):
shared.alreadyAttemptedConnectionsListLock.release() shared.alreadyAttemptedConnectionsListLock.release()
except threading.ThreadError as e: except threading.ThreadError as e:
pass pass
self.name = "outgoingSynSender-" + peer.host self.name = "outgoingSynSender-" + peer.host.replace(":", ".") # log parser field separator
if peer.host.find(':') == -1: if peer.host.find(':') == -1:
address_family = socket.AF_INET address_family = socket.AF_INET
else: else:

View File

@ -46,7 +46,7 @@ class receiveDataThread(threading.Thread):
self.sock = sock self.sock = sock
self.peer = shared.Peer(HOST, port) self.peer = shared.Peer(HOST, port)
self.name = "receiveData-" + self.peer.host self.name = "receiveData-" + self.peer.host.replace(":", ".") # ":" log parser field separator
self.streamNumber = streamNumber self.streamNumber = streamNumber
self.objectsThatWeHaveYetToGetFromThisPeer = {} self.objectsThatWeHaveYetToGetFromThisPeer = {}
self.selfInitiatedConnections = selfInitiatedConnections self.selfInitiatedConnections = selfInitiatedConnections

View File

@ -36,7 +36,7 @@ class sendDataThread(threading.Thread):
someObjectsOfWhichThisRemoteNodeIsAlreadyAware): someObjectsOfWhichThisRemoteNodeIsAlreadyAware):
self.sock = sock self.sock = sock
self.peer = shared.Peer(HOST, PORT) self.peer = shared.Peer(HOST, PORT)
self.name = "sendData-" + self.peer.host self.name = "sendData-" + self.peer.host.replace(":", ".") # log parser field separator
self.streamNumber = streamNumber self.streamNumber = streamNumber
self.services = 0 self.services = 0
self.initiatedConnection = False self.initiatedConnection = False