Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0231d800ef | ||
|
|
1a33d2ef0a |
@@ -75,7 +75,7 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
String file = File.ReadAllText(folder + "/" + restr);
|
String file = File.ReadAllText(folder + "/" + restr);
|
||||||
if(requests.GetSections(false).Contains(restr)) {
|
if(requests != null && requests.GetSections(false).Contains(restr)) {
|
||||||
Dictionary<String, String> vars = requests.GetSection(restr);
|
Dictionary<String, String> vars = requests.GetSection(restr);
|
||||||
foreach(KeyValuePair<String, String> item in vars) {
|
foreach(KeyValuePair<String, String> item in vars) {
|
||||||
file = file.Replace("\"{%" + item.Key.ToUpper() + "%}\"", item.Value);
|
file = file.Replace("\"{%" + item.Key.ToUpper() + "%}\"", item.Value);
|
||||||
@@ -144,7 +144,10 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose() {
|
public override void Dispose() {
|
||||||
|
if(this.httplistener.IsListening) {
|
||||||
this.httplistener.Stop();
|
this.httplistener.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
this.httplistener.Close();
|
this.httplistener.Close();
|
||||||
if(this.databackend != null) {
|
if(this.databackend != null) {
|
||||||
this.databackend.Dispose();
|
this.databackend.Dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user