Closed
Description
Line 110 in 1b9f663
Look at two code:
server.go:
package main
import "net/http"
import (
"time"
"fmt"
)
func main() {
http.HandleFunc("/test", test)
http.ListenAndServe(":9999", nil)
}
func test(w http.ResponseWriter, r *http.Request){
fmt.Println("test func")
time.Sleep(100000000000000)
}
client.go
package main
import (
"net/http"
"fmt"
)
func main() {
resp, err := http.Get("http://127.0.0.1:9999/test")
if err != nil {
fmt.Println(err.Error())
} else {
fmt.Println(resp.StatusCode)
}
}
when we run client.go, it will stuck. please notice it.