Преглед изворни кода

TChannel加个IsSending判断,防御一下Send完成要设置IsSending为false

tanghai пре 4 година
родитељ
комит
4310f6f06d
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      Unity/Assets/Mono/Module/NetworkTCP/TChannel.cs

+ 3 - 0
Unity/Assets/Mono/Module/NetworkTCP/TChannel.cs

@@ -310,6 +310,7 @@ namespace ET
 				{
 					if (this.socket == null)
 					{
+						this.isSending = false;
 						return;
 					}
 					
@@ -348,6 +349,8 @@ namespace ET
 		{
 			HandleSend(o);
 			
+			this.isSending = false;
+			
 			this.StartSend();
 		}