We identified that the commented out code in this PR was causing memory leaks. If you look at the call stack after that, the second delegate isn't calling back to clean up the objects created. For now, we just commented out the code and allow the Timer to be hit and thus calling the delegate to cleanly drop out. I wasn't sure what the need for this didReceiveUnexpectedPacket is there to detect. I would be fine with keeping it, but it's not calling the delegate and cleaning up objects.
We identified that the commented out code in this PR was causing memory leaks. If you look at the call stack after that, the second delegate isn't calling back to clean up the objects created. For now, we just commented out the code and allow the Timer to be hit and thus calling the delegate to cleanly drop out. I wasn't sure what the need for this didReceiveUnexpectedPacket is there to detect. I would be fine with keeping it, but it's not calling the delegate and cleaning up objects.