Fixed some error checking and sequencing for keepalives
Merge branch 'master' of https://github.com/jephthai/snarf