I did the same thing too with a wifi friend and he cloned his shiny dialga and I lost a shiny lugia. Sweetness. 8D
You can not ever lose your pokemon if you do the following things:
1. DON'T YOU EVER DARE OFFER FOR A 0-9 LV ABOMASNOW OR LV 100 ABRA. This is really too common and hackers have stashes of these pokemon and will swipe your clone as soon as you put it up. To avoid falling victim to a hacker, you have to think like one. If you had access to any pokemon in the world, which pokemon would you never catch and keep in your box? Make your offers level 100 female: Spoink, Baltoy, Venonat, Pineco, Zubat, Pidgey, Slowpoke, etc etc or any starter or fossil pokemon. Hackers won't have one in their box and you'll never lose your pokemon again. Also, if you dexed Arceus already, put him as your offer since your pokemon won't show up to any other person since Arceus is filtered out of the GTS for being an unobtainable pokemon. I haven't tried Shaymin/Darkrai yet but Arceus is nice to use an the offer.
2. When determining the time to shut of your DS, always shut it at least before the trade process begins. If you happen to see that it's going in and you realize you're way too late, let the offer go through and take your pokemon back as quickly as you can. As long as you trade too early, your pokemn never goes through and you'll still have it. Go too late, and it'll be gone from your party and in the system. Go at the right time and it'll go in but your save will backup and you'll also have it in your party.
I hope these two tips helped everyone. They can't patch it since they'll have to change everyone's game too. And it's only disconnecting now because of a busy server and too many people are on it and it busted. Nintendo is too cheap to buy a bigger one. 8D