Except as provided in subparagraph (B), if a defendant files a motion to dismiss under subsection (a), no discovery shall be permitted in connection with the action that is the subject of the motion, other than discovery necessary to determine a motion to dismiss for lack of jurisdiction, until such time as the court rules on the motion to dismiss.