Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
ab13152e
Commit
ab13152e
authored
5 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
43838f7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
go/zodb/db.go
go/zodb/db.go
+4
-4
No files found.
go/zodb/db.go
View file @
ab13152e
...
...
@@ -141,8 +141,8 @@ func NewDB(stor IStorage) *DB {
// shutdown marks db no longer operational due to reason.
//
// It serves both e
xplicit Close, or shutdown triggered due to error received
// by watcher. Only the first shutdown call has the effect.
// It serves both e
ither explicit Close, or shutdown triggered due to error
//
received
by watcher. Only the first shutdown call has the effect.
func
(
db
*
DB
)
shutdown
(
reason
error
)
{
db
.
downOnce
.
Do
(
func
()
{
db
.
downErr
=
reason
...
...
@@ -155,7 +155,7 @@ func (db *DB) shutdown(reason error) {
// Close closes database handle.
//
// After Close DB.Open calls will return error. However it is ok to continue
//
working with connections opened prior
Close.
//
to use connections opened prior to
Close.
func
(
db
*
DB
)
Close
()
error
{
db
.
shutdown
(
fmt
.
Errorf
(
"db is closed"
))
return
nil
...
...
@@ -222,7 +222,7 @@ func (db *DB) watcher() (err error) {
for
{
select
{
case
<-
db
.
down
:
//
should be
already shut down with concrete reason
//
db is
already shut down with concrete reason
return
fmt
.
Errorf
(
"db is down"
)
case
event
,
ok
=
<-
db
.
watchq
:
...
...
This diff is collapsed.
Click to expand it.
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