BuilderMessageHandler (UUID sessionId) { myCanceledSessions.remove(sessionId); final SessionData data = mySessionDescriptors.remove(sessionId); if (data == null) { return null; } final Channel channel = data.channel; if (channel != null) { // cleanup the attribute so that session data is not leaked channel.attr(Holder.SESSION_DATA).set(null); } return data.handler; }