Bug 984843 - Try to fix intermittent timeouts and leaks r=ehsan

From 55be314a97a4934167ad466dc884fb5c933dea1e Mon Sep 17 00:00:00 2001