We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00beeb1 commit a24b927Copy full SHA for a24b927
crossplane/function/runtime.py
@@ -82,6 +82,9 @@ def serve(
82
If insecure is true requests will be served insecurely, even if credentials
83
are supplied.
84
"""
85
+ # Define the loop before the server so everything uses the same loop.
86
+ loop = asyncio.get_event_loop()
87
+
88
server = grpc.aio.server()
89
90
grpcv1beta1.add_FunctionRunnerServiceServicer_to_server(function, server)
@@ -104,7 +107,6 @@ async def start():
104
107
await server.start()
105
108
await server.wait_for_termination()
106
109
- loop = asyncio.get_event_loop()
110
try:
111
loop.run_until_complete(start())
112
finally:
0 commit comments