Add +5 seconds for timeout so sync timeout will not trigger no response from server.

This commit is contained in:
Christian 2019-06-10 10:01:10 +00:00
parent 7a4ab8dff2
commit 2685b2b5e9
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class Connection {
{String type, String action, dynamic data = "", int timeout}) async {
if (client.isLogged() == false && client.homeserver == null)
throw ("No homeserver specified.");
if (timeout == null) timeout = syncTimeoutSec;
if (timeout == null) timeout = syncTimeoutSec + 5;
if (!(data is String)) data = jsonEncode(data);
final url = "${client.homeserver}/_matrix${action}";