Remove unnecessary ctx cancel check

This commit is contained in:
Zoltán Papp
2024-10-07 13:05:11 +02:00
parent 1f25bb0751
commit ba3cdb30ee
2 changed files with 20 additions and 22 deletions

View File

@@ -85,7 +85,7 @@ func (p *ProxyWrapper) proxyToLocal(ctx context.Context) {
defer p.WgeBPFProxy.removeTurnConn(uint16(p.wgEndpointAddr.Port))
buf := make([]byte, 1500)
for ctx.Err() == nil {
for {
n, err := p.readFromRemote(ctx, buf)
if err != nil {
return