Skip to content

Commit 0f69d72

Browse files
csoni111cpg
authored andcommitted
use single service for both local and remote server (#15)
1 parent 965f3b1 commit 0f69d72

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

src/fs/fs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func main() {
133133
}
134134

135135
runtime.GOMAXPROCS(1000)
136-
go startLocalServer(rootDir, metadata, isDemo)
136+
go service.startLocalServer()
137137

138138
// Continually connect to the proxy and listen for requests
139139
// Reconnect if there is an error

src/fs/local_server.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@ package main
1111

1212
import (
1313
"net"
14-
"github.com/amahi/go-metadata"
1514
)
1615

1716
const LocalServerPort = "4563"
1817

19-
func startLocalServer(rootDir string, metadata *metadata.Library, isDemo bool) {
20-
service, err := NewMercuryFSService(rootDir, ":"+LocalServerPort, isDemo)
21-
if err != nil {
22-
log(err.Error())
23-
return
24-
}
25-
service.metadata = metadata
18+
func (service *MercuryFsService) startLocalServer() {
2619

2720
addr, err := net.ResolveTCPAddr("tcp", ":"+LocalServerPort)
2821
if err != nil {

0 commit comments

Comments
 (0)