sources/interface.cpp

changeset 58
d175243ad169
parent 55
79e5460a8a56
child 69
eb4c25284a19
--- a/sources/interface.cpp	Tue Dec 16 02:30:31 2014 +0200
+++ b/sources/interface.cpp	Tue Dec 16 02:48:18 2014 +0200
@@ -830,7 +830,8 @@
 		case INPUTSTATE_PASSWORD:
 			if (g_inputState == INPUTSTATE_PASSWORD and not current_input().is_empty())
 			{
-				RCONSession* session = RCONSession::new_session();
+				RCONSession* session = RCONSession::get_session();
+				session->disconnect();
 				session->set_password (current_input());
 				session->connect (g_address);
 				set_input_state (INPUTSTATE_NORMAL);
@@ -963,7 +964,8 @@
 	if (g_address.port == 0)
 		g_address.port = 10666;
 
-	RCONSession* session = RCONSession::new_session();
+	RCONSession* session = RCONSession::get_session();
+	session->disconnect();
 	session->set_password (password);
 	session->connect (g_address);
 }

mercurial