mirror of https://github.com/schollz/croc.git
whoops
This commit is contained in:
parent
a59399630d
commit
5a94062171
|
@ -240,8 +240,8 @@ func send(forceSend int, serverAddress string, tcpPorts []string, isLocal bool,
|
||||||
err: nil,
|
err: nil,
|
||||||
}
|
}
|
||||||
if !useWebsockets {
|
if !useWebsockets {
|
||||||
log.Debug("sending extra magic")
|
log.Debug("sending extra magic to %d others", len(tcpPorts)-1)
|
||||||
for i := 0; i < len(tcpConnections)-1; i++ {
|
for i := 0; i < len(tcpPorts)-1; i++ {
|
||||||
log.Debug("sending magic")
|
log.Debug("sending magic")
|
||||||
dataChan <- DataChan{
|
dataChan <- DataChan{
|
||||||
b: []byte("magic"),
|
b: []byte("magic"),
|
||||||
|
@ -350,7 +350,6 @@ func send(forceSend int, serverAddress string, tcpPorts []string, isLocal bool,
|
||||||
go func(i int, wg *sync.WaitGroup, dataChan <-chan DataChan, tcpConnection comm.Comm) {
|
go func(i int, wg *sync.WaitGroup, dataChan <-chan DataChan, tcpConnection comm.Comm) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
for data := range dataChan {
|
for data := range dataChan {
|
||||||
log.Debugf("%d sending", i)
|
|
||||||
if data.err != nil {
|
if data.err != nil {
|
||||||
log.Error(data.err)
|
log.Error(data.err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue