v1.5.1 增强程序稳定性
This commit is contained in:
@@ -73,6 +73,12 @@ func OpenFS(dir string, options *FSOptions) (*FS, error) {
|
||||
|
||||
func (this *FS) init() {
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Println("[BFS]sync goroutine panic:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// sync in background
|
||||
for range this.syncTicker.C {
|
||||
this.syncLoop()
|
||||
@@ -80,6 +86,12 @@ func (this *FS) init() {
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Println("[BFS]closing goroutine panic:", r)
|
||||
}
|
||||
}()
|
||||
|
||||
for {
|
||||
this.processClosingBFiles()
|
||||
}
|
||||
|
||||
1
EdgeNode/internal/utils/bfs/testdata/test.b
vendored
Normal file
1
EdgeNode/internal/utils/bfs/testdata/test.b
vendored
Normal file
File diff suppressed because one or more lines are too long
0
EdgeNode/internal/utils/bfs/testdata/test2.m
vendored
Normal file
0
EdgeNode/internal/utils/bfs/testdata/test2.m
vendored
Normal file
Reference in New Issue
Block a user