@alex @colinsmatt11 Each side of the connection sends a heartbeat packet and each also has a timeout for receving each heartbeat. If the hartbeat drops after the timeout, then connection is considered closed. It stays open as long as there is a heartbeat.
Regular HTTP connections get closed as soon as the message gets completely sent.