Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ce2ec198
Commit
ce2ec198
authored
Oct 29, 2014
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #166 from fjl/fix/mist-quit
Fix Mist Shutdown
parents
f05d422a
e252dbf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
ethereum.go
ethereum.go
+3
-1
javascript_runtime.go
javascript/javascript_runtime.go
+1
-7
No files found.
ethereum.go
View file @
ce2ec198
...
@@ -490,6 +490,9 @@ func (s *Ethereum) peerHandler(listener net.Listener) {
...
@@ -490,6 +490,9 @@ func (s *Ethereum) peerHandler(listener net.Listener) {
}
}
func
(
s
*
Ethereum
)
Stop
()
{
func
(
s
*
Ethereum
)
Stop
()
{
// Stop eventMux first, it will close all subscriptions.
s
.
eventMux
.
Stop
()
// Close the database
// Close the database
defer
s
.
db
.
Close
()
defer
s
.
db
.
Close
()
...
@@ -514,7 +517,6 @@ func (s *Ethereum) Stop() {
...
@@ -514,7 +517,6 @@ func (s *Ethereum) Stop() {
}
}
s
.
txPool
.
Stop
()
s
.
txPool
.
Stop
()
s
.
stateManager
.
Stop
()
s
.
stateManager
.
Stop
()
s
.
eventMux
.
Stop
()
s
.
blockPool
.
Stop
()
s
.
blockPool
.
Stop
()
ethlogger
.
Infoln
(
"Server stopped"
)
ethlogger
.
Infoln
(
"Server stopped"
)
...
...
javascript/javascript_runtime.go
View file @
ce2ec198
...
@@ -25,8 +25,7 @@ type JSRE struct {
...
@@ -25,8 +25,7 @@ type JSRE struct {
Vm
*
otto
.
Otto
Vm
*
otto
.
Otto
pipe
*
ethpipe
.
JSPipe
pipe
*
ethpipe
.
JSPipe
events
event
.
Subscription
events
event
.
Subscription
quitChan
chan
bool
objectCb
map
[
string
][]
otto
.
Value
objectCb
map
[
string
][]
otto
.
Value
}
}
...
@@ -51,7 +50,6 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
...
@@ -51,7 +50,6 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
otto
.
New
(),
otto
.
New
(),
ethpipe
.
NewJSPipe
(
ethereum
),
ethpipe
.
NewJSPipe
(
ethereum
),
nil
,
nil
,
make
(
chan
bool
),
make
(
map
[
string
][]
otto
.
Value
),
make
(
map
[
string
][]
otto
.
Value
),
}
}
...
@@ -104,10 +102,6 @@ func (self *JSRE) Require(file string) error {
...
@@ -104,10 +102,6 @@ func (self *JSRE) Require(file string) error {
func
(
self
*
JSRE
)
Stop
()
{
func
(
self
*
JSRE
)
Stop
()
{
self
.
events
.
Unsubscribe
()
self
.
events
.
Unsubscribe
()
// Kill the main loop
self
.
quitChan
<-
true
close
(
self
.
quitChan
)
jsrelogger
.
Infoln
(
"stopped"
)
jsrelogger
.
Infoln
(
"stopped"
)
}
}
...
...
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