From 601a7f468d65a303ba6c0bdb6169322c1badba42 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期五, 31 八月 2018 16:43:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/HttpRequest/HttpBehaviour.cs | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/System/HttpRequest/HttpBehaviour.cs b/System/HttpRequest/HttpBehaviour.cs
index d914d34..f28a99a 100644
--- a/System/HttpRequest/HttpBehaviour.cs
+++ b/System/HttpRequest/HttpBehaviour.cs
@@ -1,11 +1,11 @@
-锘縰sing System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using System;
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
using System.Net;
-using System.Text;
-using System.IO;
-
+using System.Text;
+using System.IO;
+
public class HttpBehaviour : MonoBehaviour
{
@@ -122,14 +122,25 @@
if (getResult)
{
- if (callBack != null)
+ try
{
- callBack(ok, message);
- callBack = null;
DebugEx.LogFormat("Http 鏁版嵁閫氫俊 {0},璇锋眰鏁版嵁缁撴灉锛歿1},鍐呭锛歿2}", this.url, ok, message);
+
+ if (callBack != null)
+ {
+ callBack(ok, message);
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.Log(ex);
+ }
+ finally
+ {
+ callBack = null;
+ Destroy(this.gameObject);
}
- Destroy(this.gameObject);
}
}
@@ -194,5 +205,5 @@
}
}
-
-}
+
+}
--
Gitblit v1.8.0