Added reader closing (if it will help) and returns default group rather than "null"
This commit is contained in:
parent
c090d9a9f6
commit
30d0d48386
8 changed files with 37 additions and 13 deletions
|
|
@ -59,6 +59,8 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (reader.Read())
|
||||
return new Ban((string)reader["IP"], (string)reader["Name"], (string)reader["Reason"]);
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -84,6 +86,8 @@ namespace TShockAPI.DB
|
|||
{
|
||||
if (reader.Read())
|
||||
return new Ban((string)reader["IP"], (string)reader["Name"], (string)reader["Reason"]);
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue