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
96ce6bac
Commit
96ce6bac
authored
Jun 11, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ns_server_poll(): setting current_time to now after select()
parent
50c0b958
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
mongoose.c
mongoose.c
+4
-0
No files found.
mongoose.c
View file @
96ce6bac
...
@@ -862,6 +862,10 @@ int ns_server_poll(struct ns_server *server, int milli) {
...
@@ -862,6 +862,10 @@ int ns_server_poll(struct ns_server *server, int milli) {
tv
.
tv_usec
=
(
milli
%
1000
)
*
1000
;
tv
.
tv_usec
=
(
milli
%
1000
)
*
1000
;
if
(
select
((
int
)
max_fd
+
1
,
&
read_set
,
&
write_set
,
NULL
,
&
tv
)
>
0
)
{
if
(
select
((
int
)
max_fd
+
1
,
&
read_set
,
&
write_set
,
NULL
,
&
tv
)
>
0
)
{
// select() might have been waiting for a long time, reset current_time
// now to prevent last_io_time being set to the past.
current_time
=
time
(
NULL
);
// Accept new connections
// Accept new connections
if
(
server
->
listening_sock
!=
INVALID_SOCKET
&&
if
(
server
->
listening_sock
!=
INVALID_SOCKET
&&
FD_ISSET
(
server
->
listening_sock
,
&
read_set
))
{
FD_ISSET
(
server
->
listening_sock
,
&
read_set
))
{
...
...
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