mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-09 13:59:54 +00:00
Fix ConnGauge nil crash
This commit is contained in:
parent
ac1233a6f9
commit
214f1cf72c
@ -81,11 +81,15 @@ func (c *serverClient) Run() {
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
c.ConnGauge.Inc()
|
||||
if c.ConnGauge != nil {
|
||||
c.ConnGauge.Inc()
|
||||
}
|
||||
go func() {
|
||||
c.handleStream(stream)
|
||||
_ = stream.Close()
|
||||
c.ConnGauge.Dec()
|
||||
if c.ConnGauge != nil {
|
||||
c.ConnGauge.Dec()
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user