The message box uses a nested event loop to process events.
Since you have not closed the port yet you are just getting more errors, resulting in entering the same slots over and over again.

Cheers,
_