diff --git a/FAQ.md b/FAQ.md index a00a912..ed096f1 100644 --- a/FAQ.md +++ b/FAQ.md @@ -191,7 +191,8 @@ If Telegram servers decide to shutdown this secondary connection, it's not an is This should be transparent and pending API calls should automatically be resent upon reconnection. You can choose to increase `MaxAutoReconnects` if it happens too often because your Internet connection is unstable. -3) If you reach `MaxAutoReconnects` disconnections, then the **Update** event handler will receive a `ReactorError` object to notify you of the problem. +3) If you reach `MaxAutoReconnects` disconnections, then the **Update** event handler will receive a `ReactorError` object to notify you of the problem, +and pending API calls throw the network IOException. In this case, the recommended action would be to dispose the client and recreate one 4) In case of slow Internet connection or if you break in the debugger for some time, diff --git a/src/Client.cs b/src/Client.cs index b330d0c..c3d0132 100644 --- a/src/Client.cs +++ b/src/Client.cs @@ -329,6 +329,7 @@ namespace WTelegram } catch { + OnUpdate(reactorError); lock (_pendingRpcs) // abort all pending requests { foreach (var rpc in _pendingRpcs.Values) @@ -336,7 +337,6 @@ namespace WTelegram _pendingRpcs.Clear(); _bareRpc = null; } - OnUpdate(reactorError); } finally {