http service: add pets list length check

0 length lists cause a redis exception from sadd, which I think is not being handled correctly by jedis and leaking the error into further commands
This commit is contained in:
Adam
2021-08-04 12:54:49 -04:00
parent 92e85d5db0
commit 912a68effa
2 changed files with 10 additions and 1 deletions

View File

@@ -1238,7 +1238,10 @@ public class ChatCommandsPlugin extends Plugin
try
{
List<Integer> petList = getPetList().stream().map(Pet::getIconID).collect(Collectors.toList());
chatClient.submitPetList(playerName, petList);
if (!petList.isEmpty())
{
chatClient.submitPetList(playerName, petList);
}
}
catch (Exception ex)
{