remove set_keepalive in receive method and we return a flag let user decide what to do