fix: 修复forward不释放,一直创建新的forward,耗尽文件句柄

This commit is contained in:
余泓铮
2024-05-20 14:33:48 +08:00
parent 4b1cb35d75
commit 118f9cc1fa
8 changed files with 56 additions and 59 deletions
+1 -2
View File
@@ -124,8 +124,7 @@ func TestDevice_Forward(t *testing.T) {
setupDevices(t)
for _, device := range devices {
localPort := 61000
err := device.Forward(localPort, 6790)
localPort, err := device.Forward(6790)
if err != nil {
t.Fatal(err)
}