Commit 297df714 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed error that prevented to send packets with empty FROM attribute.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@631 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5c77e14e
......@@ -39,8 +39,8 @@ public class SocketPacketWriteHandler implements ChannelHandler {
public void process(Packet packet) throws UnauthorizedException, PacketException {
try {
JID recipient = packet.getTo();
Session senderSession = sessionManager.getSession(packet.getFrom());
if (recipient == null || (recipient.getNode() == null && recipient.getResource() == null)) {
Session senderSession = sessionManager.getSession(packet.getFrom());
if (senderSession != null && !senderSession.getConnection().isClosed()) {
senderSession.getConnection().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