Skip to content

Commit

Permalink
Update cycle_upnpevents.php
Browse files Browse the repository at this point in the history
  • Loading branch information
tarasfrompir committed Aug 12, 2019
1 parent ac950db commit 458cc1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/cycle_upnpevents.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
// main cycle
// create socket
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");
socket_set_option($socket,SOL_SOCKET, SO_RCVTIMEO, array("sec"=>5, "usec"=>0));
socket_bind($socket, getLocalIp() , 54345) or die("Could not bind to socket\n");
socket_listen($socket, 20840) or die("Could not set up socket listener\n");

while (1) {
if (time() - $checked_time > 5*60) {
$checked_time = time();
Expand Down

0 comments on commit 458cc1e

Please sign in to comment.