getSession returns the current session in a thread-safe manner.
()
| 772 | |
| 773 | // getSession returns the current session in a thread-safe manner. |
| 774 | func (p *Proxy) getSession() *agent.Session { |
| 775 | p.sessionMu.RLock() |
| 776 | defer p.sessionMu.RUnlock() |
| 777 | return p.session |
| 778 | } |
| 779 | |
| 780 | // setSession replaces the current session in a thread-safe manner. |
| 781 | func (p *Proxy) setSession(s *agent.Session) { |
no outgoing calls
no test coverage detected