casparcg-connection
casparcg-connection copied to clipboard
Command timeout/reconnection strategy
Since there's no ping-protocol in AMCP, only sent messages can probe the socket's state. This can not be done at a lower level, due to node.js net.Socket restrictions.
So, when a command times out, we can expect the Socket to be down, IF the command was sent properly (which we normally can expect).
At the moment, we discard sent commands that time out. This should be one of three options:
- Discard
- Retry (max attempts)
- Verify and choose (test a simple INFO-command, then choose to discard or retry)
PING command added in 2.1.x onwards ... but still an issue for 2.0.7.
Discard has issues - we end up sending multiple commands again.