fix fd leak

This commit is contained in:
Page Fault
2020-05-17 04:07:36 +00:00
parent 0d785fd3cc
commit a661696224
10 changed files with 35 additions and 14 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ func RunClientAPI(ctx context.Context, config *conf.GlobalConfig, auth stat.Auth
if err != nil {
return err
}
log.Info("Client api service is running at", config.API.APIAddress)
log.Info("Trojan-Go client-side API service is listening on", config.API.APIAddress)
errChan := make(chan error, 1)
go func() {
errChan <- server.Serve(listener)
+1 -1
View File
@@ -161,7 +161,7 @@ func RunServerAPI(ctx context.Context, config *conf.GlobalConfig, auth stat.Auth
if err != nil {
return err
}
log.Info("Server api service is running at", config.API.APIAddress)
log.Info("Trojan-Go server-side API service is listening on", config.API.APIAddress)
errChan := make(chan error, 1)
go func() {
errChan <- server.Serve(listener)