spesmilo/electrum-server — pull request #51 by grnbrg (2013-12-29 23:36:30+00:00)
Title: Retry connection between Electrum and Bitcoind.

Included code from http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
to wrap a retry loop around the connection to bitcoind.

When bitcoind fails (ie: When it is restarted weekly.) electrum-server
will now attempt to connect 4 times at 30 second intervals before
aborting.

I know very little Python, and am not at all familiar with the
Electrum codebase, so this patch may well need some polish. But it
works just fine for me.