PROTOCOL_ENQUEUE_AFTER_QUIT or PROTOCOL_ENQUEUE_HANDSHAKE_TWICE is created with so many connect() and end() in the code, I tried removing many of these from the code. I don't think it's a perfect solution even tho I could connect it with my database for storing details.