Fix a couple of logcontext leaks

Use preserve_fn to correctly manage the logcontexts around things we don't want
to yield on.
This commit is contained in:
Richard van der Hoff 2017-03-23 00:17:46 +00:00
parent 35e0cfb54d
commit 19b9366d73
2 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import synapse.util.logcontext
from twisted.internet import defer
from synapse.api.errors import CodeMessageException
@ -173,4 +173,5 @@ class RetryDestinationLimiter(object):
"Failed to store set_destination_retry_timings",
)
store_retry_timings()
# we deliberately do this in the background.
synapse.util.logcontext.preserve_fn(store_retry_timings)()