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
d244a7fd
Commit
d244a7fd
authored
Nov 09, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #437 from jhnwkmn/nsf-close-immediately
If socket is about to be closed do not add to [read|write]_set.
parents
e7ac6024
300a27de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
mongoose.c
mongoose.c
+11
-10
No files found.
mongoose.c
View file @
d244a7fd
...
@@ -1024,6 +1024,9 @@ time_t ns_mgr_poll(struct ns_mgr *mgr, int milli) {
...
@@ -1024,6 +1024,9 @@ time_t ns_mgr_poll(struct ns_mgr *mgr, int milli) {
if
(
!
(
conn
->
flags
&
(
NSF_LISTENING
|
NSF_CONNECTING
)))
{
if
(
!
(
conn
->
flags
&
(
NSF_LISTENING
|
NSF_CONNECTING
)))
{
ns_call
(
conn
,
NS_POLL
,
&
current_time
);
ns_call
(
conn
,
NS_POLL
,
&
current_time
);
}
}
if
(
conn
->
flags
&
NSF_CLOSE_IMMEDIATELY
)
{
ns_close_conn
(
conn
);
}
else
{
if
(
!
(
conn
->
flags
&
NSF_WANT_WRITE
))
{
if
(
!
(
conn
->
flags
&
NSF_WANT_WRITE
))
{
//DBG(("%p read_set", conn));
//DBG(("%p read_set", conn));
ns_add_to_set
(
conn
->
sock
,
&
read_set
,
&
max_fd
);
ns_add_to_set
(
conn
->
sock
,
&
read_set
,
&
max_fd
);
...
@@ -1034,8 +1037,6 @@ time_t ns_mgr_poll(struct ns_mgr *mgr, int milli) {
...
@@ -1034,8 +1037,6 @@ time_t ns_mgr_poll(struct ns_mgr *mgr, int milli) {
//DBG(("%p write_set", conn));
//DBG(("%p write_set", conn));
ns_add_to_set
(
conn
->
sock
,
&
write_set
,
&
max_fd
);
ns_add_to_set
(
conn
->
sock
,
&
write_set
,
&
max_fd
);
}
}
if
(
conn
->
flags
&
NSF_CLOSE_IMMEDIATELY
)
{
ns_close_conn
(
conn
);
}
}
}
}
...
...
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