mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
set timeout to 10 seconds on sync
This commit is contained in:
parent
aa1a5fcc0d
commit
0d87b6f32d
2 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,6 @@ class Exporter(object):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# FIXME: media support
|
|
||||||
class AnkiExporter(Exporter):
|
class AnkiExporter(Exporter):
|
||||||
|
|
||||||
key = _("Anki decks (*.anki)")
|
key = _("Anki decks (*.anki)")
|
||||||
|
|
|
@ -868,6 +868,8 @@ class HttpSyncServerProxy(SyncServer):
|
||||||
def connect(self, clientVersion=""):
|
def connect(self, clientVersion=""):
|
||||||
"Check auth, protocol & grab deck list."
|
"Check auth, protocol & grab deck list."
|
||||||
if not self.decks:
|
if not self.decks:
|
||||||
|
import socket
|
||||||
|
socket.setdefaulttimeout(10)
|
||||||
d = self.runCmd("getDecks",
|
d = self.runCmd("getDecks",
|
||||||
libanki=anki.version,
|
libanki=anki.version,
|
||||||
client=clientVersion,
|
client=clientVersion,
|
||||||
|
|
Loading…
Reference in a new issue