Expose shouldkeepalive function