- Fix waitpid usage - Move free of connection struct out of main loop - Avoid using connection struct after it is freed