edited ci config

This commit is contained in:
2022-07-27 12:11:27 +08:00
parent 6e81d229f6
commit 3d35dfa658
2 changed files with 24 additions and 30 deletions

View File

@@ -95,11 +95,10 @@ func listener(port int) {
}
}
}()
fmt.Println("waiting exit")
aaaa := <-exit // 2. 尝试从通道中读取内容,若通道为空,则阻塞在此
exitsignal := <-exit // 2. 尝试从通道中读取内容,若通道为空,则阻塞在此
sstop <- "stop sender"
rstop <- "stop receiver"
fmt.Printf("command: %v\n", aaaa)
fmt.Printf("command: %v\n", exitsignal)
return
}
@@ -256,10 +255,11 @@ func dial(host string, port int) {
}
}
}()
aaaa := <-exit //尝试从通道中读取内容,若通道为空,则阻塞在此
exitsignal := <-exit //尝试从通道中读取内容,若通道为空,则阻塞在此
sstop <- "stop sender"
rstop <- "stop receiver"
fmt.Printf("command: %v\n", aaaa)
fmt.Printf("command: %v\n", exitsignal)
return
}
@@ -358,6 +358,16 @@ func sender(conn *net.TCPConn, exit chan string, receive chan int, sstop chan st
receive <- 1
return
}
if strings.HasPrefix(inp, "cd ..") {
fmt.Println("don't use .. change dir")
return
}
if strings.HasPrefix(inp, "cd .") {
fmt.Println("don't use . change dir")
return
}
conn.Write([]byte(inp))
receive <- 1
return