public void disconnect() {
		connection.getRoster().removeRosterListener(leagueRosterListener);
		try {
			connection.disconnect();
		} catch (final NotConnectedException e) {
			e.printStackTrace();
		}
		stop = true;
	}
public void disconnect ( ) { connection . getRoster ( ) . removeRosterListener ( leagueRosterListener ) ; try { connection . disconnect ( ) ; } catch ( final NotConnectedException e ) { e . printStackTrace ( ) ; } stop = true ; }
Disconnects from chatserver and releases all resources.