How to send Go Live notification via Twitch API?

One more thing…

If a user’s stream stops unexpectedly due to any possible error, then how much time after the last packet is sent will Twitch end the live stream?

So, I’m talking about a case when an error occurs and our tool is unable to send a stream to Twitch for some time.
Then, will Twitch end the stream immediately or wait for a specified time before ending the stream on Twitch?

Someone told me that Twitch waits for 10 minutes since the time when the last packet was received before ending the stream automatically from their side.

Would be great if you could help me with it.

Thanks in advance!