Open socket before defer close
This commit is contained in:
parent
0d05c20961
commit
0f78b51945
|
@ -67,6 +67,8 @@ func main() {
|
|||
|
||||
}
|
||||
|
||||
ln, _ := net.Listen("tcp", ":8081")
|
||||
|
||||
//cleanup
|
||||
defer func() {
|
||||
cmd.Process.Kill()
|
||||
|
@ -85,7 +87,7 @@ func main() {
|
|||
}()
|
||||
|
||||
//accepts command from cmd.go and sends them to the server
|
||||
ln, _ := net.Listen("tcp", ":8081")
|
||||
|
||||
go func() {
|
||||
//accept connections from clients
|
||||
for {
|
||||
|
|
Loading…
Reference in New Issue