From b7ade4bccd8b88a9938eb96d590403c5d42d1cdf Mon Sep 17 00:00:00 2001 From: Peter Iakovlev Date: Sun, 17 Feb 2019 02:56:01 +0400 Subject: [PATCH] Report error on request timeout --- MTProtoKit/MTTcpConnection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MTProtoKit/MTTcpConnection.m b/MTProtoKit/MTTcpConnection.m index 7c64dada02..f019c98e0c 100644 --- a/MTProtoKit/MTTcpConnection.m +++ b/MTProtoKit/MTTcpConnection.m @@ -607,7 +607,7 @@ struct ctr_state { if (MTLogEnabled()) { MTLog(@"[MTTcpConnection#%x response timeout]", (int)self); } - [self stop]; + [self closeAndNotifyWithError:true]; } - (void)socket:(GCDAsyncSocket *)__unused socket didReadPartialDataOfLength:(NSUInteger)partialLength tag:(long)__unused tag