Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
ab6f145e
Commit
ab6f145e
authored
Aug 25, 2012
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update thread count on OOM error in worker_thread()
parent
001cd78b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
27 deletions
+28
-27
mongoose.c
mongoose.c
+28
-27
No files found.
mongoose.c
View file @
ab6f145e
...
@@ -4136,8 +4136,7 @@ static void worker_thread(struct mg_context *ctx) {
...
@@ -4136,8 +4136,7 @@ static void worker_thread(struct mg_context *ctx) {
conn
=
(
struct
mg_connection
*
)
calloc
(
1
,
sizeof
(
*
conn
)
+
buf_size
);
conn
=
(
struct
mg_connection
*
)
calloc
(
1
,
sizeof
(
*
conn
)
+
buf_size
);
if
(
conn
==
NULL
)
{
if
(
conn
==
NULL
)
{
cry
(
fc
(
ctx
),
"%s"
,
"Cannot create new connection struct, OOM"
);
cry
(
fc
(
ctx
),
"%s"
,
"Cannot create new connection struct, OOM"
);
return
;
}
else
{
}
conn
->
buf_size
=
buf_size
;
conn
->
buf_size
=
buf_size
;
conn
->
buf
=
(
char
*
)
(
conn
+
1
);
conn
->
buf
=
(
char
*
)
(
conn
+
1
);
...
@@ -4158,13 +4157,15 @@ static void worker_thread(struct mg_context *ctx) {
...
@@ -4158,13 +4157,15 @@ static void worker_thread(struct mg_context *ctx) {
conn
->
request_info
.
is_ssl
=
conn
->
client
.
is_ssl
;
conn
->
request_info
.
is_ssl
=
conn
->
client
.
is_ssl
;
if
(
!
conn
->
client
.
is_ssl
||
if
(
!
conn
->
client
.
is_ssl
||
(
conn
->
client
.
is_ssl
&&
sslize
(
conn
,
conn
->
ctx
->
ssl_ctx
,
SSL_accept
)))
{
(
conn
->
client
.
is_ssl
&&
sslize
(
conn
,
conn
->
ctx
->
ssl_ctx
,
SSL_accept
)))
{
process_new_connection
(
conn
);
process_new_connection
(
conn
);
}
}
close_connection
(
conn
);
close_connection
(
conn
);
}
}
free
(
conn
);
free
(
conn
);
}
// Signal master that we're done with connection and exiting
// Signal master that we're done with connection and exiting
(
void
)
pthread_mutex_lock
(
&
ctx
->
mutex
);
(
void
)
pthread_mutex_lock
(
&
ctx
->
mutex
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment