Task.async before socket redirect?

The way to avoid that is to use a Task.Supervisor to start the task instead. You’d add one to your application’s supervisor tree and then use Task.Supervisor.start_child to launch tasks into it.