I can't able to change the "To address" while send message

I have user contact list screen, I decide to chat with someone. while click the user from the contact list. It’s move to chat window. i can chat with that person which i click from the contact list. Then i decide to chat with another person who are in the contact list. I selected some other person gain from the contact list. while send the message,it’s going to the person who i selected first. it’s not send second person. Is there need any connection closed every person chatting. "I’m using openfire server and smack api "