| 8 | ) |
| 9 | |
| 10 | type Tunnel struct { |
| 11 | id uint64 // key in kites's tunnels map |
| 12 | localConn sockjs.Session // conn to local kite |
| 13 | startChan chan bool // to signal started state |
| 14 | closeChan chan bool // to signal closed state |
| 15 | closed bool // to prevent closing closeChan again |
| 16 | closedMutex sync.Mutex // for protection of closed field |
| 17 | } |
| 18 | |
| 19 | func (t *Tunnel) Close() { |
| 20 | t.closedMutex.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected