P.S.: I just noticed the question explicitly said indoors! My answer ended up being considerably more general than required... But well, the logic is the same as in case (a): Indoors the bolts are really close, so you should climb (or downclimb) to the nearest one and attach yourself to the fixed quickdraw using the harness belay loop.
Both options you suggest are bad, since they have a long time gap in order to be implemented: Trying a knot with a single hand takes a lot of time, and downclimbing (due to "height" reasons) is either slow or useless if you're, say, on pitch 5. The solution to the problem you pose depends on whether you are: (a) climbing a bolted route; (b) climbing on gear, that is, using cams, nuts and etc to protect yourself. The best solution has nothing to do with height, unless you are still near the ground.
Case (a): Check how far you are from the next or last bolt. Consider if what is ahead of you looks easier than what you have already climbed since the last bolt. If you sense you can down-climb just enough to reach the bolt below you, do so; if you feel climbing up is clearly easier, climb up to the next bolt. When you get to the chosen bolt, secure yourself to it using a personal anchoring system or a quickdraw. Then, and only then, redo your knot.
Case (b): Check if you can place gear. If this is the case, place a piece and attach yourself to it with a quickdraw. Do not weight the piece! Using the first piece as a backup, place a second one. If it is clear both of them are bomber, you can weight them and redo your knot. You can keep adding pieces until you feel safe. Now, if you find yourself far from a place where protection is possible, it is almost always better to downclimb: one cannot know when a good spot for placing gear will appear (perhaps never). Try to downclimb back to your last piece, and then place a second one near it to redo your knot, as described earlier.
Consider that this is a situation where one is expected to be hurt in the end. This is not an acceptable error, like forgetting to open your chalk bag when you start climbing or not wearing a helmet. If you tied yourself wrong and survived without a scratch, this is shear luck: the odds were against you here.