deep-entertainment / issues

Issue tracker for deep Entertainment projects
1 stars 0 forks source link

GodotTPD - Client receives no response when the response is async #49

Open luisfilipedcc opened 2 months ago

luisfilipedcc commented 2 months ago

Project:

Describe the bug Responses is not delivered to the client when the response is deferred.

To Reproduce Steps to reproduce the behavior:

signal create_session
signal session_created

# Handle a GET request
func handle_get(request: HttpRequest, response: HttpResponse):
    create_session.emit(request.parameters)
    var token = await session_created
    response.json(200, token)

Replacing the "await session_created" for a string, the client receives the response right away. Without that replacement, the client does not receive any response.

Expected behavior It would be nice to be able to use this addon even if our response depends on awaiters.

Versions