Need to check if the server pool is closing before calling reconnect, as the method is synchronized and can cause deadlocks