Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cellframe/libdap-server-core
1 result
Show changes
Commits on Source (7)
......@@ -79,7 +79,7 @@
//dap_events_socket_info_t **s_dap_events_sockets;
static uint32_t s_threads_count = 1;
static size_t s_connection_timeout = 600;
static size_t s_connection_timeout = 6000;
static struct epoll_event *g_epoll_events = NULL;
dap_worker_t *s_workers = NULL;
......@@ -332,6 +332,14 @@ static void *thread_worker_function( void *arg )
continue;
}
//connection already closed (EPOLLHUP - shutdown has been made in both directions)
if(events[n].events & EPOLLHUP && events[n].events & EPOLLERR) {
log_it( L_DEBUG,"Socket error (EPOLLHUP): 0x%x",events[n].events );
if(!(events[n].events & EPOLLIN))
cur->no_close = false;
cur->flags |= DAP_SOCK_SIGNAL_CLOSE;
}
if ( events[n].events & EPOLLERR ) {
log_it( L_ERROR,"Socket error: %s",strerror(errno) );
cur->flags |= DAP_SOCK_SIGNAL_CLOSE;
......
......@@ -288,7 +288,7 @@ void dap_events_socket_delete( dap_events_socket_t *a_es, bool preserve_inherito
*/
size_t dap_events_socket_write(dap_events_socket_t *sc, const void * data, size_t data_size)
{
log_it(L_DEBUG,"dap_events_socket_write %u sock data %X size %u", sc->socket, data, data_size );
//log_it(L_DEBUG,"dap_events_socket_write %u sock data %X size %u", sc->socket, data, data_size );
data_size = ((sc->buf_out_size+data_size)<(sizeof(sc->buf_out)))?data_size:(sizeof(sc->buf_out)-sc->buf_out_size );
memcpy(sc->buf_out+sc->buf_out_size,data,data_size);
......
......@@ -72,7 +72,7 @@
#define DAP_MAX_THREAD_EVENTS 8192
#define DAP_MAX_THREADS 16
#define SOCKET_TIMEOUT_TIME 30
#define SOCKET_TIMEOUT_TIME 300
#define SOCKETS_TIMEOUT_CHECK_PERIOD 15
static uint32_t _count_threads = 0;
......@@ -459,7 +459,7 @@ static void read_write_cb( dap_client_remote_t *dap_cur, int32_t revents )
_current_run_server->client_write_callback( dap_cur, NULL ); // Call callback to process write event
if( dap_cur->buf_out_size == 0 ) {
log_it(L_DEBUG, "dap_cur->buf_out_size = 0, set ev_read watcher " );
//log_it(L_DEBUG, "dap_cur->buf_out_size = 0, set ev_read watcher " );
dap_cur->pevent.events = EPOLLIN | EPOLLERR;
if( epoll_ctl(dap_cur->efd, EPOLL_CTL_MOD, dap_cur->socket, &dap_cur->pevent) != 0 ) {
......