Changeset - 3f3c73988787
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-04-04 11:44:12
hanzz.k@gmail.com
Send StreamError on error
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/user.cpp
Show inline comments
 
@@ -25,6 +25,8 @@
 
#include "transport/usermanager.h"
 
#include "transport/conversationmanager.h"
 
#include "Swiften/Swiften.h"
 
#include "Swiften/Server/ServerStanzaChannel.h"
 
#include "Swiften/Elements/StreamError.h"
 

	
 
namespace Transport {
 

	
 
@@ -110,6 +112,7 @@ void User::handleDisconnected(const std::string &error) {
 
	msg->setBody(error);
 
	msg->setTo(m_jid.toBare());
 
	m_component->getStanzaChannel()->sendMessage(msg);
 
	dynamic_cast<Swift::ServerStanzaChannel *>(m_component->getStanzaChannel())->finishSession(m_jid, boost::shared_ptr<Swift::Element>(new Swift::StreamError()));
 

	
 
	m_userManager->removeUser(this);
 
}
0 comments (0 inline, 0 general)