From afd6d06252902e576ba29c7228aa607057b92dc2 Mon Sep 17 00:00:00 2001 From: solarin Date: Thu, 9 Apr 2020 12:30:10 +0400 Subject: [PATCH] minor stylish changes --- TLSharp.Core/Network/TcpTransport.cs | 6 +++--- TLSharp.Core/TelegramClient.cs | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/TLSharp.Core/Network/TcpTransport.cs b/TLSharp.Core/Network/TcpTransport.cs index 0adfd31..36542f6 100644 --- a/TLSharp.Core/Network/TcpTransport.cs +++ b/TLSharp.Core/Network/TcpTransport.cs @@ -16,9 +16,9 @@ namespace TLSharp.Core.Network private NetworkStream stream; private int sendCounter = 0; TcpClientConnectionHandler handler; - string address; - int port; - IPAddress ipAddress; + readonly string address; + readonly int port; + readonly IPAddress ipAddress; public TcpTransport(string address, int port, TcpClientConnectionHandler handler = null) { diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index 494a281..d67a593 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -81,8 +81,6 @@ namespace TLSharp.Core session = Session.TryLoadOrCreateNew(store, sessionUserId); await transport.Connect(); } - if (!transport.IsConnected) - throw new Exception("Connection to Telegram failed"); if (session.AuthKey == null || reconnect) {