Browse Source

Attempt to force creation of the socket file

Nathaniel van Diepen 7 years ago
parent
commit
b2618832a7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Net/socket.class.php

+ 5 - 0
Net/socket.class.php

@@ -72,6 +72,11 @@
 			$this->throw_if($this->socket);
 			$this->throw_if($this->socket);
 			if($this->socket_type == static::SERVER){
 			if($this->socket_type == static::SERVER){
 				if(is_null($this->port)){
 				if(is_null($this->port)){
+					if(file_exists($this->address)){
+						chmod($this->address, 0702);
+					}elseif(function_exists('posix_mkfifo'){
+						posix_mkfifo($this->address, 0702);
+					}
 					socket_bind($this->socket, $this->address);
 					socket_bind($this->socket, $this->address);
 				}else{
 				}else{
 					$res = socket_bind($this->socket, $this->address, $this->port);
 					$res = socket_bind($this->socket, $this->address, $this->port);