aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2017-03-28 15:50:25 -0700
committerGravatar Ken Payson <kpayson@google.com>2017-03-28 16:20:04 -0700
commitc9a3aaaa541f6915c0ea886acc1026eba27da881 (patch)
tree02c6757feb4278b9bf6ef4ba39316d4df14370f5 /src/python
parent98a723787f6e499481e27386195c524b6568df65 (diff)
Fix Python poll() server spinlock bug
Diffstat (limited to 'src/python')
-rw-r--r--src/python/grpcio/grpc/_server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py
index 47838c2c98..f29c44a4cf 100644
--- a/src/python/grpcio/grpc/_server.py
+++ b/src/python/grpcio/grpc/_server.py
@@ -705,6 +705,10 @@ def _serve(state):
state.rpc_states.remove(rpc_state)
if _stop_serving(state):
return
+ # We want to force the deletion of the previous event
+ # ~before~ we poll again; if the event has a reference
+ # to a shutdown Call object, this can induce spinlock.
+ event = None
def _stop(state, grace):