首先建议把日志功能改为写数据库,因为这个日志功能不是线程安全的。多线程情况下会有文件写冲突。或者把日志功能包装放到一个方法里,使用try处理
其次这里加上日志看有没有反馈
Private Shared Sub SendString(ByVal str As String)
Dim hc As New HttpClient("http://10.131.50.120/weatherData.htm")
hc.C
Dim jo As new JObject
jo("data") = str
Dim ret As String
try
hc.Content = jo.ToString
ret = hc.GetData
catch ex As exception
Output.Logs("监听日志").Add("接口调用异常--" & ex.Message)
Output.Logs("监听日志").Save("C:\Listen.txt",True)
'Return ex.message
End try
End Sub
End class