You can't fix it. This does happen alot. I am not sure of the circumstances though as some are lucky enough to auto-reconnect. What I do know is that technically being killed shouldn't let you reconnect because technically it is the same as you 'quit'ing, rather than being cut off for another reason.

Solutions:

1. Don't get killed - it should only happen when you annoy peeps. Or...
2. Script in an ON ERROR 'fix'