Skip to content

Commit c911fc9

Browse files
committed
Fix issue where GCM pushkins behind proxy fail to start
1 parent 4feeedf commit c911fc9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sygnal/sygnal.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
17+
import asyncio
1718
import copy
1819
import importlib
1920
import logging
@@ -28,7 +29,7 @@
2829
from opentracing import Tracer
2930
from opentracing.scope_managers.asyncio import AsyncioScopeManager
3031
from twisted.internet import asyncioreactor, defer
31-
from twisted.internet.defer import Deferred, ensureDeferred
32+
from twisted.internet.defer import Deferred
3233
from twisted.internet.interfaces import (
3334
IReactorCore,
3435
IReactorFDSet,
@@ -225,7 +226,9 @@ def run(self) -> None:
225226
@defer.inlineCallbacks
226227
def start() -> Generator[Deferred[Any], Any, Any]:
227228
try:
228-
yield ensureDeferred(self.make_pushkins_then_start())
229+
yield Deferred.fromFuture(
230+
asyncio.ensure_future(self.make_pushkins_then_start())
231+
)
229232
except Exception:
230233
# Print the exception and bail out.
231234
print("Error during startup:", file=sys.stderr)

0 commit comments

Comments
 (0)