Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishapi
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
varnishapi
Commits
dfde15f5
Commit
dfde15f5
authored
Aug 13, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak
parent
5ea57c90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
log.go
pkg/log/log.go
+4
-4
No files found.
pkg/log/log.go
View file @
dfde15f5
...
...
@@ -386,7 +386,7 @@ func (log *Log) checkNil() error {
// native resources associated with this client. You should always
// call Release when you're done using a Log client, otherwise there
// is risk of resource leakage.
//
// It is wise to make use of Go's defer mechanism:
//
// vlog := log.New()
...
...
@@ -808,9 +808,11 @@ func (log *Log) Read(rdHndlr ReadHandler, eolHndlr EOLHandler) error {
var
status
C
.
int
rddata
.
wg
.
Add
(
1
)
defer
rddata
.
wg
.
Done
()
cancelChan
:=
rddata
.
cancel
defer
close
(
cancelChan
)
for
status
=
C
.
vsl_more
;
status
==
C
.
vsl_more
;
{
select
{
case
<-
rddata
.
cancel
:
case
<-
cancelChan
:
status
=
C
.
int
(
Stopped
)
break
default
:
...
...
@@ -821,9 +823,7 @@ func (log *Log) Read(rdHndlr ReadHandler, eolHndlr EOLHandler) error {
continue
}
}
cancelChan
:=
rddata
.
cancel
rddata
.
cancel
=
nil
close
(
cancelChan
)
rdHndlr
(
nil
,
Status
(
status
))
C
.
VSLQ_Delete
(
&
vslq
)
}(
vslq
,
n
,
&
rddata
,
eolHndlr
)
...
...
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