Browse Source

models/server: fix bug, program will core if listener is nil

pull/7/head
fatedier 9 years ago
parent
commit
3218eda481
  1. 4
      src/frp/models/server/server.go

4
src/frp/models/server/server.go

@ -128,7 +128,9 @@ func (p *ProxyServer) Start() (err error) {
func (p *ProxyServer) Close() {
p.Lock()
p.Status = consts.Idle
p.listener.Close()
if p.listener != nil {
p.listener.Close()
}
close(p.ctlMsgChan)
close(p.cliConnChan)
p.userConnList = list.New()

Loading…
Cancel
Save