You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
twisted.web.server.Request.getSession() calls self.sessionFactory to create a session. This is the same as calling twisted.web.server.Session, which accepts a reactor parameter. However, getSession() doesn't pass this parameter, which defaults to the global reactor.
Calling Request.getSession() should use the reactor associated with the Site.
#!CommitTicketReference repository="" revision="cae365213868e8226a055f6b5e4d2c0c89c9ab3b"
Merge pull request #1587 from twisted/getsession-global-reactor-10177
Author: twm
Reviewer: wsanchez
Fixes: ticket:10177
Sessions: use the site reactor, not the global one
twisted.web.server.Request.getSession()
callsself.sessionFactory
to create a session. This is the same as callingtwisted.web.server.Session
, which accepts a reactor parameter. However,getSession()
doesn't pass this parameter, which defaults to the global reactor.Calling
Request.getSession()
should use the reactor associated with theSite
.This causes use of Treq's
StubTreq
to touch the global reactor: https://github.com/twisted/treq/pull/328/files#r612941248Searchable metadata
The text was updated successfully, but these errors were encountered: