change dead connection detect algorithm