Fix NPE in HttpSession when closing a connection that was preventing listeners from being triggered

Description

Fix NPE in HttpSession when closing a connection that was preventing listeners from being triggered.

2008.06.26 10:34:58 [org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:160)] Could not close socket
org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection@f9aa66
java.lang.NullPointerException
at org.jivesoftware.openfire.http.HttpSession$Deliverable.getPackets(HttpSession.java:833)
at org.jivesoftware.openfire.http.HttpSession.failDelivery(HttpSession.java:702)
at org.jivesoftware.openfire.http.HttpSession.closeConnection(HttpSession.java:691)
at org.jivesoftware.openfire.http.HttpSession.access$200(HttpSession.java:55)
at org.jivesoftware.openfire.http.HttpSession$HttpVirtualConnection.closeVirtualConnection(HttpSession.java:760)
at org.jivesoftware.openfire.net.VirtualConnection.close(VirtualConnection.java:156)
at org.jivesoftware.openfire.http.HttpSession.close(HttpSession.java:166)
at org.jivesoftware.openfire.handler.IQBindHandler.handleIQ(IQBindHandler.java:126)
at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:49)
at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:351)
at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:101)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:6
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:100)
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:61)
at org.jivesoftware.openfire.http.HttpSession.sendPendingPackets(HttpSession.java:465)
at org.jivesoftware.openfire.http.HttpSessionManager$HttpPacketSender.run(HttpSessionManager.java:31
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created June 27, 2008 at 5:41 AM
Updated June 27, 2008 at 5:42 AM
Resolved June 27, 2008 at 5:42 AM