Is there any option to force farmer to reconnect to its node that I'm not aware of?

When my node is closed, all of its connecting farmers (both local and remote in LAN) have the following error:

2024-01-04T02:06:29.353988Z ERROR jsonrpsee_core::client::async_client: [backend]: Networking or low-level protocol error: WebSocket connection error: i/o error: An existing connection was forcibly closed by the remote host. (os error 10054)

In order to resume, I always have to run node and all farmers again. Is it possible to just run the node and all of its connecting farmers will resume the connection to the node automatically when it’s live again?

I’m not sure why you have to run the node again, and either way you should have some restarting mechanism for farmers. So when farmer disconnects and shuts down, it will just restart and reconnect to the node again.

There’re 2 scenario:

  1. The node instance just stop/close for no reason
  2. The PC where I run the node is rebooted

In both scenario, the farmers at the remote PC have above error and all stop. Even when I run the node again, they’re not automatically reconnected (I have to close the farmer instance one by one and open it again to connect to the node). So if we can make them reconnect to its node, it’d be great.

Feel free to contribute, but it is typically much easier to restart the whole farmer rather than implementing reconnection. Also connecting remote farmers is not the intended usage scenario, even though some users do that.