Skip to content

Commit

Permalink
Fix grace period bug in _end.accept_ticket
Browse files Browse the repository at this point in the history
Tickets should not be ignored if the end is in a grace period; rather
they should be ignored if they are for an unrecognized (likely new)
operation and the end is in a grace period.
  • Loading branch information
nathanielmanistaatgoogle committed Aug 29, 2015
1 parent 68e63c7 commit 1d14618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/grpcio/grpc/framework/core/_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ def add_idle_action(self, action):
def accept_ticket(self, ticket):
"""See links.Link.accept_ticket for specification."""
with self._lock:
if self._cycle is not None and not self._cycle.grace:
if self._cycle is not None:
operation = self._cycle.operations.get(ticket.operation_id)
if operation is not None:
operation.handle_ticket(ticket)
elif self._servicer_package is not None:
elif self._servicer_package is not None and not self._cycle.grace:
termination_action = _termination_action(
self._lock, self._stats, ticket.operation_id, self._cycle)
operation = _operation.service_operate(
Expand Down

0 comments on commit 1d14618

Please sign in to comment.