Skip to content

Commit

Permalink
fix: proxy run blocked program execution
Browse files Browse the repository at this point in the history
  • Loading branch information
muzea committed Aug 24, 2019
1 parent c0ccc64 commit a457308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portfw.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func prepareTCPHandler(localPort int, targetAddr *net.TCPAddr) {
log.Fatalln(err)
}
tcpProxyPool[localPort] = localProxy
localProxy.Run()
go localProxy.Run()
}

func prepareUDPHandler(localPort int, targetAddr *net.UDPAddr) {
Expand All @@ -102,7 +102,7 @@ func prepareUDPHandler(localPort int, targetAddr *net.UDPAddr) {
log.Fatalln(err)
}
udpProxyPool[localPort] = localProxy
localProxy.Run()
go localProxy.Run()
}

func closeAndDelete(localPort string) {
Expand Down

0 comments on commit a457308

Please sign in to comment.