Handle InterruptedException.