fixed a bug when peer resets during loop mode - heartbleed.c