Transaction m_send_trans;
Transaction m_recv_trans;
- bool m_ise_exiting;
bool m_config_readonly;
Ecore_Thread *m_thread;
: PanelAgentBase ("socket_config_server"),
m_should_exit (false),
m_socket_timeout (scim_get_default_socket_timeout ()),
- m_ise_exiting (false),
m_config_readonly (false),
m_thread (NULL) {
m_socket_server.signal_connect_accept (slot (this, &SocketConfigServerPanelAgent::socket_accept_callback));
}
~SocketConfigServerPanelAgent () {
+ stop ();
}
static void
SocketConfigServerPanelAgent *thiz = (SocketConfigServerPanelAgent *)data;
thiz->close ();
}
+
static void
_thread_cancel_cb(void *data, Ecore_Thread *th) {
LOGW ("");
void run() {
m_socket_server.run ();
}
+
void close() {
SocketClient client;
if (client.connect (SocketAddress (m_socket_address))) {
LOGD ("");
m_config_connection.disconnect ();
lock ();
-
+ m_should_exit = true;
if (m_thread && !ecore_thread_check(m_thread)) {
ecore_thread_cancel(m_thread);
- m_thread = NULL;
+ if (!ecore_thread_wait (m_thread, 5))
+ LOGW ("We couldn't terminate in less than 5s some pending IO");
}
- m_should_exit = true;
+ m_thread = NULL;
unlock ();
- m_clients.clear ();
_config.reset ();
}
private: