I'd rather see this if-else flipped: short block above the larger block.  i.e. `if ! wait_for_reply; stanza; else;...`