Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
18
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
e3e81759
Commit
e3e81759
authored
4 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.demlabs.net/cellframe/cellframe-sdk
into release-2.8
parents
8c378a2d
57299015
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/net/client/dap_client_http.c
+9
-1
9 additions, 1 deletion
dap-sdk/net/client/dap_client_http.c
dap-sdk/net/core/dap_events_socket.c
+1
-1
1 addition, 1 deletion
dap-sdk/net/core/dap_events_socket.c
with
10 additions
and
2 deletions
dap-sdk/net/client/dap_client_http.c
+
9
−
1
View file @
e3e81759
...
...
@@ -123,6 +123,10 @@ static bool s_timer_timeout_check(void * a_arg)
assert
(
l_worker
);
if
(
dap_events_socket_check_unsafe
(
l_worker
,
l_es
)
){
if
((
l_es
->
type
!=
DESCRIPTOR_TYPE_SOCKET_CLIENT
)
&&
(
l_es
->
type
!=
DESCRIPTOR_TYPE_SOCKET_UDP
))
{
log_it
(
L_CRITICAL
,
"Timer esocket wrong argument: socket %d type %d, ignore this timeout..."
,
l_es
->
socket
,
l_es
->
type
);
return
false
;
}
dap_client_http_pvt_t
*
l_http_pvt
=
PVT
(
l_es
);
log_it
(
L_WARNING
,
"Connection timeout for request http://%s:%u/%s, possible network problems or host is down"
,
l_http_pvt
->
uplink_addr
,
l_http_pvt
->
uplink_port
,
l_http_pvt
->
path
);
...
...
@@ -131,7 +135,11 @@ static bool s_timer_timeout_check(void * a_arg)
l_http_pvt
->
were_callbacks_called
=
true
;
}
l_http_pvt
->
is_closed_by_timeout
=
true
;
l_es
->
flags
|=
DAP_SOCK_SIGNAL_CLOSE
;
log_it
(
L_INFO
,
"Close %s sock %u type %d by timeout"
,
l_es
->
remote_addr_str
?
l_es
->
remote_addr_str
:
""
,
l_es
->
socket
,
l_es
->
type
);
dap_events_socket_remove_and_delete_unsafe
(
l_es
,
true
);
}
else
{
log_it
(
L_INFO
,
"Socket %d type %d already disposed"
,
l_es
->
socket
,
l_es
->
type
);
}
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
dap-sdk/net/core/dap_events_socket.c
+
1
−
1
View file @
e3e81759
...
...
@@ -1466,7 +1466,7 @@ bool dap_events_socket_check_unsafe(dap_worker_t * a_worker,dap_events_socket_t
if
(
a_worker
->
esockets
){
dap_events_socket_t
*
l_es
=
NULL
;
pthread_rwlock_rdlock
(
&
a_worker
->
esocket_rwlock
);
HASH_FIND
(
hh_worker
,
a_worker
->
esockets
,
&
a_es
,
sizeof
(
a_es
),
l_es
);
HASH_FIND
(
hh_worker
,
a_worker
->
esockets
,
&
a_es
,
sizeof
(
void
*
),
l_es
);
pthread_rwlock_unlock
(
&
a_worker
->
esocket_rwlock
);
return
l_es
==
a_es
;
}
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment