File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ func (self *WgProxy) SetClients(clients map[netip.Addr]*WgClient) (returnErr err
219219 return
220220}
221221
222- // if any devices are already active, keep them active
222+ // only clients not already in the state are added
223223func (self * WgProxy ) AddClients (clients map [netip.Addr ]* WgClient ) (returnErr error ) {
224224 self .stateLock .Lock ()
225225 defer self .stateLock .Unlock ()
@@ -249,19 +249,6 @@ func (self *WgProxy) AddClients(clients map[netip.Addr]*WgClient) (returnErr err
249249 for addr , client := range newClients {
250250 self .clients [addr ] = client
251251 }
252- for addr , client := range newClients {
253- if _ , ok := self .activeClients [addr ]; ok {
254- // refresh the tun
255- tun , err := client .Tun ()
256- if err == nil {
257- tun .SetReceive (self .receive )
258- self .activeClients [addr ] = tun
259- } else {
260- delete (self .activeClients , addr )
261- returnErr = errors .Join (returnErr , err )
262- }
263- }
264- }
265252
266253 return
267254}
You can’t perform that action at this time.
0 commit comments