mopidy/tests/utils
Trygve Aaberge 265951bf00 network: disable_recv before telling actor to close connection
As of d62ad96, when the connection can't receive more data from the
client, it tells the actor to stop the connection and calls
disable_recv(). The actor operates in it's own thread and when it stops
the connection, disable_recv is being called again from a different
thread. Since the actor is told to stop the connection before
disable_recv is called, the two calls to disable_recv may happen
simultaneously.

This causes a race condition issue where both threads can reach past the
check that recv_id is not None before either of them set it to None. If
one of them set it to None before the other one tries to use it, an
error is raised.

This commit calls disable_recv before telling the actor to stop the
connection. Since disable_recv is a blocking call, this ensures that
recv_id is being set to None before the actor thread begins to stop the
connection.

Fixes #781
2014-08-14 01:58:48 +02:00
..
network network: disable_recv before telling actor to close connection 2014-08-14 01:58:48 +02:00
__init__.py Make all strings unicode by default (fixes #224) 2012-11-13 00:18:47 +01:00
test_deps.py Fix all import order warnings 2014-05-07 20:08:43 +02:00
test_encoding.py Fix all import order warnings 2014-05-07 20:08:43 +02:00
test_jsonrpc.py Fix all import order warnings 2014-05-07 20:08:43 +02:00
test_path.py utils: Remove old find_files 2014-02-26 23:53:12 +01:00