Fix timeout-related regression in core.discover

The new timeout logic in core.discover had a side-effect of forcing the timeout to be 100ms in all cases, even when a longer timeout is passed. This fix retains the 100ms timeout for the response queries, while allowing the while loop to continue for the full timeout period.