Explorar o código

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

tanghai %!s(int64=4) %!d(string=hai) anos
pai
achega
4310f6f06d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)
 					if (this.socket == null)
 					{
 					{
+						this.isSending = false;
 						return;
 						return;
 					}
 					}
 					
 					
@@ -348,6 +349,8 @@ namespace ET
 		{
 		{
 			HandleSend(o);
 			HandleSend(o);
 			
 			
+			this.isSending = false;
+			
 			this.StartSend();
 			this.StartSend();
 		}
 		}