Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: Hijack deadlock if system clock is 1970 #19747
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Yes, the net and net/http packages implement some connection timeout logic by changing the timeout to times way in the past. But apparently on your machine
We could move
But does your clock at least advance ever, even though it boots at 1970-01-01?
Which Raspberry Pi is this?
I see. And you don't want to use ntp to fix the clock?
This is an HTTP server, so by definition it at least has some network available. Or maybe it's just localhost or local LAN?
And you're fine with the Server's "Date" response header being wrong? And Last-Modified and If-Modified-Since and such not working quite right?
I guess the question is how much we make an effort to do the right thing for busted clocks. I suppose Raspberry Pis are common, so we should make some effort.
Now it is easy for me to fix it.
But it was not easy to figure out, that an old timestamp was the reason for a broken websocket.
My raspberry pi has no internet connection, only local lan. Without any changes I have this old timestamp automatically. Raspberry pi has no internal battery clock.
For my IoT project I do not need a correct time.
BTW: In the standard raspberry pi image ntp is installed and setup by default.