When the client instantiates the server offline, connection will never be established. Currently, in the code you catch the error, but do nothing with it. It would be nice, if that would update automatically when going online.
Therefore, I suggest to add a timer with a retry timer given in the properties (with some meaningful default, e.g. 5000ms). It could retry not only on initSyng (when reading the JSON definition), but also if a request fails.
When the client instantiates the server offline, connection will never be established. Currently, in the code you catch the error, but do nothing with it. It would be nice, if that would update automatically when going online.
Therefore, I suggest to add a timer with a retry timer given in the properties (with some meaningful default, e.g. 5000ms). It could retry not only on initSyng (when reading the JSON definition), but also if a request fails.
e.g.