summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cramer <dcramer@gmail.com>2016-08-30 12:53:51 -0700
committerDavid Cramer <dcramer@gmail.com>2016-08-30 12:53:51 -0700
commit737b48d8e6e5ba53a9a53b4aaef86a2366a6c58b (patch)
tree34fb578d1ba4f4e25d34c331f20eaffc76bb1bea
parent915c0571f22613b0e4fd8399d0b50332e4520c73 (diff)
downloadraven-737b48d8e6e5ba53a9a53b4aaef86a2366a6c58b.tar.gz
Dont utilize weakrefs
-rw-r--r--raven/contrib/django/middleware/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/raven/contrib/django/middleware/__init__.py b/raven/contrib/django/middleware/__init__.py
index f9fd2c1..d8c1df9 100644
--- a/raven/contrib/django/middleware/__init__.py
+++ b/raven/contrib/django/middleware/__init__.py
@@ -94,7 +94,11 @@ class SentryMiddleware(threading.local):
# we utilize request_finished as the exception gets reported
# *after* process_response is executed, and thus clearing the
# transaction there would leave it empty
- request_finished.connect(self.request_finished)
+ # XXX(dcramer): weakref's cause a threading issue in certain
+ # versions of Django (e.g. 1.6). While they'd be ideal, we're under
+ # the assumption that Django will always call our function except
+ # in the situation of a process or thread dying.
+ request_finished.connect(self.request_finished, weak=False)
return None