Skip to content
Snippets Groups Projects
Commit 674816ff authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

ZMQ: Temporary fix to microdrop code to prevent state from resetting until I...

ZMQ: Temporary fix to microdrop code to prevent state from resetting until I can figure out why it's listening in the send state.
parent dcb5e586
Branches
Tags
No related merge requests found
......@@ -57,9 +57,11 @@ class microdropConnection(object):
[1] -- The recieved message or "" if no message received.
"""
if self.state == SEND:
print "WAR: Microdrop Connection state invalid, resetting..."
self.reset()
self.__init__(self.port)
print "WAR: [uDrop-listen] Connection state invalid, resetting..."
# self.reset()
# self.__init__(self.port)
return (False, "")
try:
message = self.soc.recv(flags=zmq.NOBLOCK, copy=True)
self.state = SEND
......@@ -74,7 +76,7 @@ class microdropConnection(object):
data -- a str to be sent
"""
if self.state == RECV:
print "WAR: Microdrop Connection state invalid, resetting..."
print "WAR: [uDrop-reply] Connection state invalid, resetting..."
self.reset()
self.__init__(self.port)
return False
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment