# Reconnecting To An Event

Establishing appropriate reconnection logic is an integral element when integrating with our APIs. Our streaming endpoint issues a heartbeat every ten seconds to validate that the connection to an event is healthy.

Disconnection from an event can happen without warning; if the connection to the WebSocket is closed or a heartbeat is not received for ten seconds, we recommend a mechanism to automatically reconnect. If a heartbeat is not received for ten seconds, an automatic attempt to reconnect to the event should be made after eleven seconds.

Possessing the correct reconnection methodology within your integration will prevent a select number of issues arising in the future. Please see [Event Disconnections](https://img-arena.gitbook.io/tennis/-M-nnUijRFbIhBBjSfUz/event-disconnections) - this defines what alarm packets are and why these should not be mistaken for a disconnection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/tennis/documentation-1/reconnecting-to-an-event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
