mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
moved release lock to before return response
This commit is contained in:
parent
217056b8bd
commit
474edac0f5
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user