Server: refactor resetting election timeout into method