Read the passage.

Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore—
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
“’Tis some visitor,” I muttered, “tapping at my chamber door—
Only this, and nothing more.”

In this excerpt from “The Raven” by Edgar Allan Poe, what is the speaker doing when he hears a knock at the door?

A. Reading
B. Pacing
C. Weeping
D. Sleeping