diff --git a/miniupnpc/miniupnpc.c b/miniupnpc/miniupnpc.c index 044e044..b4a6b2a 100644 --- a/miniupnpc/miniupnpc.c +++ b/miniupnpc/miniupnpc.c @@ -533,6 +533,10 @@ upnpDiscoverDevices(const char * const deviceTypes[], *error = UPNPDISCOVER_SUCCESS; /* Calculating maximum response time in seconds */ mx = ((unsigned int)delay) / 1000u; + if(mx == 0) { + mx = 1; + delay = 1000; + } /* receiving SSDP response packet */ for(deviceIndex = 0; deviceTypes[deviceIndex]; deviceIndex++) { /* sending the SSDP M-SEARCH packet */