moved release lock to before return response

This commit is contained in:
fros4943 2007-10-23 09:46:28 +00:00
parent 217056b8bd
commit 474edac0f5

View file

@ -282,11 +282,12 @@ class Shepherd:
debug(Debug, response.toprettyxml()) debug(Debug, response.toprettyxml())
if response.documentElement.tagName == 'error': if response.documentElement.tagName == 'error':
raise chakana.error.CoojaError(response) raise chakana.error.CoojaError(response)
self._connectionLock.release()
return response return response
except socket.error: except socket.error:
debug(MajorEvent, 'Socket error catched') debug(MajorEvent, 'Socket error catched')
finally: except AttributeError:
self._connectionLock.release() debug(MajorEvent, 'Attribute error catched')
def readFromCooja(self): def readFromCooja(self):
# XXX: Assume message ends with a newline # XXX: Assume message ends with a newline