Changeset 279 in code for trunk/user.go
- Timestamp:
- Apr 30, 2020, 8:25:16 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user.go
r276 r279 130 130 } 131 131 132 func (net *network) upstream() *upstreamConn {133 return net.conn134 }135 136 132 func (net *network) Stop() { 137 133 select { … … 142 138 } 143 139 144 if uc := net.upstream(); uc!= nil {145 uc.Close()140 if net.conn != nil { 141 net.conn.Close() 146 142 } 147 143 } … … 201 197 func (u *user) forEachUpstream(f func(uc *upstreamConn)) { 202 198 for _, network := range u.networks { 203 uc := network.upstream() 204 if uc == nil { 199 if network.conn == nil { 205 200 continue 206 201 } 207 f( uc)202 f(network.conn) 208 203 } 209 204 }
Note:
See TracChangeset
for help on using the changeset viewer.