Skip to content
Snippets Groups Projects
Commit 0dd3645f authored by anta999's avatar anta999
Browse files

client commit

parent 5b9aaf70
No related merge requests found
...@@ -289,22 +289,30 @@ void dap_client_request(dap_client_t * a_client, const char * a_full_path, void ...@@ -289,22 +289,30 @@ void dap_client_request(dap_client_t * a_client, const char * a_full_path, void
* @param a_client * @param a_client
* @return * @return
*/ */
int dap_client_disconnect(dap_client_t * a_client) int dap_client_disconnect( dap_client_t *a_client )
{ {
dap_client_pvt_t * l_client_internal = (a_client) ? DAP_CLIENT_PVT(a_client) : NULL; dap_client_pvt_t *l_client_internal = (a_client) ? DAP_CLIENT_PVT(a_client) : NULL;
if(l_client_internal && l_client_internal->stream_socket){
if (l_client_internal->stream_socket ){ if ( l_client_internal && l_client_internal->stream_socket ) {
close (l_client_internal->stream_socket);
l_client_internal->stream_socket = 0; // if ( l_client_internal->stream_es ) {
} // dap_events_socket_remove_and_delete( l_client_internal->stream_es, true );
if(l_client_internal->stream_es) { // l_client_internal->stream_es = NULL;
dap_events_socket_delete(l_client_internal->stream_es, true); // }
l_client_internal->stream_es = NULL;
} l_client_internal->stream_es->signal_close = true;
// if (l_client_internal->stream_socket ) {
// close (l_client_internal->stream_socket);
l_client_internal->stream_socket = 0;
// }
return 1; return 1;
} }
//l_client_internal->stream_socket = 0; //l_client_internal->stream_socket = 0;
log_it(L_DEBUG, "dap_client_disconnect( ) done" );
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment