maxcnunes / waitforit

Wait until an address become available.
MIT License
173 stars 26 forks source link

full connection not working with hostname #1

Closed maxcnunes closed 9 years ago

maxcnunes commented 9 years ago

It works:

waitforit -full-connection=tcp://187.7.117.20:80 -timeout=20 -debug

It does not:

root@b45aeca273b1:/src# waitforit -full-connection=tcp://google.com:80 -timeout=20 -debug
panic: runtime error: index out of range

goroutine 16 [running]:
runtime.panic(0x5629c0, 0x6608fc)
    /usr/src/go/src/pkg/runtime/panic.c:279 +0xf5
main.buildConn(0x57ce70, 0x0, 0x0, 0x7fffe70f6864, 0x13, 0xc2080002e2)
    /go/src/waitforit/main.go:36 +0x3d7
main.main()
    /go/src/waitforit/main.go:75 +0x1d2

goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
    /usr/src/go/src/pkg/runtime/mheap.c:507
runtime.goexit()
    /usr/src/go/src/pkg/runtime/proc.c:1445

goroutine 18 [runnable]:
bgsweep()
    /usr/src/go/src/pkg/runtime/mgc0.c:1976
runtime.goexit()
    /usr/src/go/src/pkg/runtime/proc.c:1445

goroutine 19 [runnable]:
runfinq()
    /usr/src/go/src/pkg/runtime/mgc0.c:2606
runtime.goexit()
    /usr/src/go/src/pkg/runtime/proc.c:1445
maxcnunes commented 9 years ago

It was fixed long time ago :)