mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
Fix UPnP line endings (ref #211)
This commit is contained in:
parent
9c5c06bf31
commit
7c6fb018ca
@ -60,14 +60,14 @@ func Discover() (*IGD, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
search := []byte(`
|
searchStr := `M-SEARCH * HTTP/1.1
|
||||||
M-SEARCH * HTTP/1.1
|
|
||||||
Host: 239.255.255.250:1900
|
Host: 239.255.255.250:1900
|
||||||
St: urn:schemas-upnp-org:device:InternetGatewayDevice:1
|
St: urn:schemas-upnp-org:device:InternetGatewayDevice:1
|
||||||
Man: "ssdp:discover"
|
Man: "ssdp:discover"
|
||||||
Mx: 3
|
Mx: 3
|
||||||
|
|
||||||
`)
|
`
|
||||||
|
search := []byte(strings.Replace(searchStr, "\n", "\r\n", -1))
|
||||||
|
|
||||||
_, err = socket.WriteTo(search, ssdp)
|
_, err = socket.WriteTo(search, ssdp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user