You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while sleep 1; do mpc status; done manages to trigger:
Traceback (most recent call last):
File "/home/adamcik/dev/mopidy/mopidy/utils/network.py", line 272, in recv_callback
self.disable_recv()
File "/home/adamcik/dev/mopidy/mopidy/utils/network.py", line 236, in disable_recv
gobject.source_remove(self.recv_id)
TypeError: an integer is required
The text was updated successfully, but these errors were encountered:
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.
Fixesmopidy#781
while sleep 1; do mpc status; done
manages to trigger:The text was updated successfully, but these errors were encountered: