Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
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
uplex-varnish
unique-xids
Commits
50a77ab0
Commit
50a77ab0
authored
May 31, 2011
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do proper non-blocking reads.
Spotted: drwilco Fixes: #914
parent
effaadab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
cli_common.c
lib/libvarnish/cli_common.c
+5
-5
No files found.
lib/libvarnish/cli_common.c
View file @
50a77ab0
...
...
@@ -123,12 +123,12 @@ read_tmo(int fd, char *ptr, unsigned len, double tmo)
pfd
.
fd
=
fd
;
pfd
.
events
=
POLLIN
;
for
(
j
=
0
;
len
>
0
;
)
{
i
=
poll
(
&
pfd
,
1
,
(
int
)(
tmo
*
1e3
));
if
(
i
==
0
)
{
errno
=
ETIMEDOUT
;
return
(
-
1
);
}
for
(
j
=
0
;
len
>
0
;
)
{
i
=
read
(
fd
,
ptr
,
len
);
if
(
i
<
0
)
return
(
i
);
...
...
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