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 { ...@@ -39,8 +39,8 @@ public class SocketPacketWriteHandler implements ChannelHandler {
public void process(Packet packet) throws UnauthorizedException, PacketException { public void process(Packet packet) throws UnauthorizedException, PacketException {
try { try {
JID recipient = packet.getTo(); JID recipient = packet.getTo();
Session senderSession = sessionManager.getSession(packet.getFrom());
if (recipient == null || (recipient.getNode() == null && recipient.getResource() == null)) { if (recipient == null || (recipient.getNode() == null && recipient.getResource() == null)) {
Session senderSession = sessionManager.getSession(packet.getFrom());
if (senderSession != null && !senderSession.getConnection().isClosed()) { if (senderSession != null && !senderSession.getConnection().isClosed()) {
senderSession.getConnection().deliver(packet); 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