Commit 87e638f1 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Ignore requests to send null/void packets. JM-1311

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches/openfire_3_5_0@10131 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0aca87c8
...@@ -610,6 +610,10 @@ public class HttpSession extends LocalClientSession { ...@@ -610,6 +610,10 @@ public class HttpSession extends LocalClientSession {
} }
private synchronized void deliver(String text) { private synchronized void deliver(String text) {
if (text == null) {
// Do nothing if someone asked to send nothing :)
return;
}
deliver(new Deliverable(text)); deliver(new Deliverable(text));
} }
...@@ -698,6 +702,10 @@ public class HttpSession extends LocalClientSession { ...@@ -698,6 +702,10 @@ public class HttpSession extends LocalClientSession {
} }
private void failDelivery(Collection<Packet> packets) { private void failDelivery(Collection<Packet> packets) {
if (packets == null) {
// Do nothing if someone asked to deliver nothing :)
return;
}
for (Packet packet : packets) { for (Packet packet : packets) {
try { try {
backupDeliverer.deliver(packet); backupDeliverer.deliver(packet);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment