This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
autofile: ensure file is open in Sync
pull/1842/head
Ethan Buchman
7 years ago
parent
9997e3a3b4
commit
0948343a6f
1 changed files
with
5 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
autofile/autofile.go
+ 5
- 0
autofile/autofile.go
View File
@ -103,6 +103,11 @@ func (af *AutoFile) Sync() error {
af
.
mtx
.
Lock
(
)
defer
af
.
mtx
.
Unlock
(
)
if
af
.
file
==
nil
{
if
err
:=
af
.
openFile
(
)
;
err
!=
nil
{
return
err
}
}
return
af
.
file
.
Sync
(
)
}
Write
Preview
Loading…
Cancel
Save