File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import (
19
19
)
20
20
21
21
func main () {
22
- peersTimer := time .NewTimer (time .Minute )
23
22
debug := true
24
23
w := webview .New (debug )
25
24
defer w .Destroy ()
@@ -71,10 +70,6 @@ func main() {
71
70
w .Bind ("onLoad" , func () {
72
71
log .Println ("page loaded" )
73
72
go run (w )
74
- go func () {
75
- <- peersTimer .C
76
- run (w )
77
- }()
78
73
})
79
74
w .Bind ("savePeers" , func (peer_list string ) {
80
75
//log.Println("peers saved ", peer_list)
@@ -137,11 +132,15 @@ func get_ctl_path() string{
137
132
}
138
133
139
134
func run (w webview.WebView ){
135
+ //var peersTimer *time.Timer
140
136
riv_ctrl_path := get_ctl_path ()
141
137
if riv_ctrl_path != "" {
142
138
get_self (w , riv_ctrl_path )
143
139
get_peers (w , riv_ctrl_path )
144
140
}
141
+ _ = time .AfterFunc (10 * time .Second , func () {
142
+ run (w )
143
+ })
145
144
}
146
145
147
146
func run_command (riv_ctrl_path string , command string ) []byte {
You can’t perform that action at this time.
0 commit comments