Selaa lähdekoodia

Tcp连接失败要调用OnError

tanghai 8 vuotta sitten
vanhempi
commit
59ab410f49
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      Unity/Assets/Scripts/Base/Network/TNet/TChannel.cs

+ 2 - 0
Unity/Assets/Scripts/Base/Network/TNet/TChannel.cs

@@ -57,9 +57,11 @@ namespace Model
 			catch (SocketException e)
 			{
 				Log.Error($"connect error: {e.SocketErrorCode}");
+				this.OnError(this, e.SocketErrorCode);
 			}
 			catch (Exception e)
 			{
+				this.OnError(this, SocketError.SocketError);
 				Log.Error($"connect error: {ipEndPoint} {e}");
 			}
 		}