summaryrefslogtreecommitdiffstats
path: root/dpd/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-08-09 16:14:06 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-08-09 16:14:06 +0200
commita00179ccdea118aad571d91f610e66c552d55a19 (patch)
treef364cc2837070e02cdff5c9a0b229ab3d0b3887e /dpd/src
parent29c56ca51fb6f782e3782035987a7a691f139eea (diff)
downloaddabmod-a00179ccdea118aad571d91f610e66c552d55a19.tar.gz
dabmod-a00179ccdea118aad571d91f610e66c552d55a19.tar.bz2
dabmod-a00179ccdea118aad571d91f610e66c552d55a19.zip
DPD CE: Fix self.sock usage in Adapt
Diffstat (limited to 'dpd/src')
-rw-r--r--dpd/src/Adapt.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dpd/src/Adapt.py b/dpd/src/Adapt.py
index 3780979..47a5e8a 100644
--- a/dpd/src/Adapt.py
+++ b/dpd/src/Adapt.py
@@ -59,6 +59,7 @@ class Adapt:
message : str
The message string that will be sent to the receiver.
"""
+ sock = self._connect()
logging.info("Send message: %s" % message)
msg_parts = message.split(" ")
for i, part in enumerate(msg_parts):
@@ -67,9 +68,9 @@ class Adapt:
else:
f = zmq.SNDMORE
- self.sock.send(part.encode(), flags=f)
+ sock.send(part.encode(), flags=f)
- data = self.sock.recv_multipart()
+ data = sock.recv_multipart()
logging.info("Received message: %s" % message)
return data