Still got dc after PING/PONG

Woah, you want us to debug 400 lines of code? Try to make a minimal example of what is not working please