diff --git a/sanic/request.py b/sanic/request.py index 7f3b87eb..26176687 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -65,7 +65,6 @@ class Request(dict): self.parsed_files = None self.parsed_args = None self._cookies = None - self._ip = None @property def json(self): @@ -143,7 +142,7 @@ class Request(dict): @property def ip(self): - if self._ip is None: + if not hasattr(self, '_ip'): self._ip = self.transport.get_extra_info('peername') return self._ip