Mitty's first daydream is of flying a Navy plane through a terrible storm. In reality, he unconsciously begins to drive faster, and his wife startles him out of the dream, asking him why he is driving so fast.
Mitty's second daydream is of being a famous surgeon, operating on a millionaire banker. He is still driving, and he is woken by a parking attendant, who calls his attention to the fact that he is driving on the wrong side of the road.
Mitty's third daydream is of being the defendant in a famous trial,and he is woken by a mental association with dog biscuits, which his wife asked him to buy.
Mitty's fourth daydream is of being a fighter pilot in World War II, and he is again woken by his wife, who was looking for him.
Mitty's final daydream is of being a condemned man facing a firing squad, brought about by his subconscious realization that he cannot escape the drudgery of his life:
...with that faint, fleeting smile playing about his lips, he faced the firing squad; erect and motionless, proud and disdainful, Walter Mitty the Undefeated, inscrutable to the last.
(Thurber, "The Secret Life of Walter Mitty," bnrg.cs.berkeley.edu)
This is Mitty's last daydream; he does not wake up from this one before the story ends.