Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xray/api.go')
-rw-r--r--xray/api.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/xray/api.go b/xray/api.go
index 10d22ae1..36b19875 100644
--- a/xray/api.go
+++ b/xray/api.go
@@ -50,7 +50,9 @@ func (x *XrayAPI) Init(apiPort int) (err error) {
}
func (x *XrayAPI) Close() {
- x.grpcClient.Close()
+ if x.grpcClient != nil {
+ x.grpcClient.Close()
+ }
x.HandlerServiceClient = nil
x.StatsServiceClient = nil
x.isConnected = false