From d34682780ce1c92e024fb8ea5db28186761a2b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E5=98=89=E4=BF=8A?= Date: Tue, 30 Apr 2013 12:48:37 +0800 Subject: [PATCH] Clear disconnection events after getting them --- pyapns/rest_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyapns/rest_service.py b/pyapns/rest_service.py index 232afcc..8adb863 100644 --- a/pyapns/rest_service.py +++ b/pyapns/rest_service.py @@ -168,8 +168,10 @@ class DisconnectionLogResource(AppEnvResourceBase): isLeaf = True def render_GET(self, request): - return json_response([d.to_simple() for d in self.app.disconnections], + response = json_response([d.to_simple() for d in self.app.disconnections], request) + self.app.disconnections.clear() + return response class FeedbackResource(AppEnvResourceBase):