net: DialTCP produces "connection refused" error on Linux but not on Windows #38684
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
To reproduce requires two application running and connecting to each other through TCP. So I've made a tiny repo that also includes the powershell build script.
dial-vs-listen
What did you expect to see?
I built the same go code for both Windows and Linux but at runtime the applications produced different results. Specifically with how TCP connections are dialed on each platform.
What did you see instead?
On Windows, when I run the two executables
clientA.exe
andclientB.exe
(built from the build.ps1 script) I get the desired result. As seen in this screenshot:However when I upload and execute the Linux binaries, the result is different:
I don't expect the
connection refused
error since these two applications are running under the same environment and the permissions are identical.The text was updated successfully, but these errors were encountered: