Skip to content

Commit

Permalink
limit jobid range and clean up existing jobids
Browse files Browse the repository at this point in the history
  • Loading branch information
rossengeorgiev committed Oct 19, 2016
1 parent fe8d311 commit bf70a41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion csgo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def send_job(self, *args, **kwargs):
:rtype: :class:`str`
"""
jobid = self.current_jobid = (self.current_jobid + 1) % 4294967295
jobid = self.current_jobid = ((self.current_jobid + 1) % 10000) or 1
self.remove_all_listeners('job_%d' % jobid)

self._send(*args, jobid=jobid, **kwargs)

Expand Down

0 comments on commit bf70a41

Please sign in to comment.