stoplightio / json-schema-sampler

Other
8 stars 2 forks source link

feat: add timeout to sample() #22

Closed mmiask closed 2 years ago

mmiask commented 2 years ago

Part of: https://github.com/stoplightio/platform-internal/issues/8075

This adds a check suggested in the connected issue, where current time is checked at each function call and compared to time of the first function call. If it exceeds a set value (default is 5000ms) it throws an error, allowing to break traverse() and possibly fixing a situation where browser hangs.