mirror of
https://github.com/schollz/croc.git
synced 2024-11-28 01:16:10 +03:00
try fix
This commit is contained in:
parent
82b0d2d4c0
commit
c0e9d478e7
@ -42,7 +42,11 @@ func Run(debugLevel, port string) {
|
||||
|
||||
func run(port string) (err error) {
|
||||
log.Debugf("starting TCP server on " + port)
|
||||
server, err := net.Listen("tcp", "0.0.0.0:"+port)
|
||||
rAddr, err := net.ResolveTCPAddr("tcp", "localhost:"+port)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
server, err := net.ListenTCP("tcp", rAddr)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Error listening on :"+port)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user