Improvements in the keep-alive protocol