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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user