Skip to content

Commit

Permalink
fix race condition causing timer warnings on window cleanup
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@17230 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 23, 2017
1 parent 472cb21 commit 04a8c74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,12 @@ def damage_packet_acked(self, damage_packet_sequence, width, height, decode_time
if bytecount>0 and end_send_at>0:
self.global_statistics.record_latency(self.wid, decode_time, start_send_at, end_send_at, pixels, bytecount)
if self._damage_delayed is not None and self._damage_delayed_expired:
self.cancel_may_send_timer()
self.may_send_timer = self.idle_add(self._may_send_delayed)
def call_may_send_delayed():
self.cancel_may_send_timer()
self.may_send_delayed()
#this function is called from the network thread,
#call via idle_add to prevent race conditions:
self.idle_add(call_may_send_delayed)
if not self._damage_delayed:
self.soft_expired = 0

Expand Down

0 comments on commit 04a8c74

Please sign in to comment.