It is not sure that reconnecting always works, this depends on the API and the reason of disconnection. When the internet is interrupted reconnection is normally no problem, but with a hard crash its different because libraries can be broken. Then you must restart. But when it reconnects, why should it close trades? Trades close by stop loss or exit commands.