()
| 175 | } |
| 176 | |
| 177 | func (s *Proxy) Close() error { |
| 178 | s.mu.Lock() |
| 179 | defer s.mu.Unlock() |
| 180 | if s.closed { |
| 181 | return nil |
| 182 | } |
| 183 | s.closed = true |
| 184 | close(s.exit.C) |
| 185 | |
| 186 | if s.jodis != nil { |
| 187 | s.jodis.Close() |
| 188 | } |
| 189 | if s.ladmin != nil { |
| 190 | s.ladmin.Close() |
| 191 | } |
| 192 | if s.lproxy != nil { |
| 193 | s.lproxy.Close() |
| 194 | } |
| 195 | if s.router != nil { |
| 196 | s.router.Close() |
| 197 | } |
| 198 | if s.ha.monitor != nil { |
| 199 | s.ha.monitor.Cancel() |
| 200 | } |
| 201 | return nil |
| 202 | } |
| 203 | |
| 204 | func (s *Proxy) XAuth() string { |
| 205 | return s.xauth |
no test coverage detected