Abstract The lifetime in a wireless network, in particular a wireless sensor network, depends strongly on the connectivity factor between nodes. Several factors can be at the origin of a connectivity rupture such as: lack of energy on a significant node level, infection of a vital node by a malevolent code and a logical or physical failure of a primary node. This rupture can lead in some cases to a reconfiguration of the network by generating a prejudicial overhead or in other cases to a failure of the mission assigned to the network. In this paper, we propose a DRFN approach (Detection and Replacement of a Failing Node) for the connectivity maintenance by carrying out a replacement chain according to a distributed algorithm. Through simulation, we have shown our approach efficiency. Compared with similar work, our proposed approach consumes less energy, and improves the percentage of reduction in field coverage.