fix(stream): use platform-specific socket options for Windows cross-compilation
This commit is contained in:
parent
55fb74c814
commit
264be4e309
3 changed files with 19 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ func (ss *StreamServer) Listen(ctx context.Context) error {
|
|||
lc := net.ListenConfig{
|
||||
Control: func(network, address string, c syscall.RawConn) error {
|
||||
return c.Control(func(fd uintptr) {
|
||||
_ = syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1)
|
||||
_ = setReuseAddr(fd)
|
||||
})
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue