Use duration for keep-alive.