File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ func main() {
102
102
for {
103
103
select {
104
104
case fileName := <- UpgradeSignal :
105
- shutdown ()
105
+ shutdown (general )
106
106
log .Logger .Info ("[Shuttle] is shutdown, for upgrade!" )
107
107
var name string
108
108
if runtime .GOOS == "windows" {
@@ -119,12 +119,12 @@ func main() {
119
119
os .Exit (0 )
120
120
case <- ShutdownSignal :
121
121
log .Logger .Info ("[Shuttle] is shutdown, see you later!" )
122
- shutdown ()
122
+ shutdown (general )
123
123
os .Exit (0 )
124
124
return
125
125
case <- signalChan :
126
126
log .Logger .Info ("[Shuttle] is shutdown, see you later!" )
127
- shutdown ()
127
+ shutdown (general )
128
128
os .Exit (0 )
129
129
return
130
130
case <- ReloadConfigSignal :
@@ -144,11 +144,13 @@ func main() {
144
144
}
145
145
}
146
146
147
- func shutdown () {
147
+ func shutdown (general * shuttle. General ) {
148
148
StopSocksSignal <- true
149
149
StopHTTPSignal <- true
150
- //disable system proxy
151
- DisableSystemProxy ()
150
+ if general .SetAsSystemProxy == "" || general .SetAsSystemProxy == shuttle .SetAsSystemProxyAuto {
151
+ //disable system proxy
152
+ DisableSystemProxy ()
153
+ }
152
154
log .Logger .Close ()
153
155
shuttle .CloseGeoDB ()
154
156
time .Sleep (time .Second )
You can’t perform that action at this time.
0 commit comments