mirror of https://github.com/joan2937/pigpio
fix localhost socket only not working
if the pigpio daemon only listens to localhost sockets, the client failed to connect - this is the propesed fix by the author, see https://github.com/joan2937/pigpio/issues/119
This commit is contained in:
parent
114653357b
commit
93dedc873c
|
@ -717,7 +717,12 @@ int pigpio_start(char *addrStr, char *portStr)
|
|||
{
|
||||
if (!gPiInUse[pi]) break;
|
||||
}
|
||||
|
||||
|
||||
if ((!addrStr) || (strlen(addrStr) == 0))
|
||||
{
|
||||
addrStr = "localhost";
|
||||
}
|
||||
|
||||
if (pi >= MAX_PI) return pigif_too_many_pis;
|
||||
|
||||
gPiInUse[pi] = 1;
|
||||
|
|
Loading…
Reference in New Issue