Skip to content

Commit 0cee9d4

Browse files
committed
fix test
1 parent af70784 commit 0cee9d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/sockets/tests/mcast_sockettype_error.phpt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ Multicast attempt on unsupported socket type
44
sockets
55
--FILE--
66
<?php
7+
$sock_path = sprintf("/tmp/%s.sock", uniqid());
8+
9+
if (file_exists($sock_path))
10+
die('Temporary socket already exists.');
711
$sock = socket_create(AF_UNIX, SOCK_DGRAM, 0);
8-
socket_bind($sock, '0.0.0.0', 0);
12+
socket_bind($sock, $sock_path);
913

1014
try {
1115
socket_set_option($sock, IPPROTO_IP, MCAST_JOIN_GROUP, array(

0 commit comments

Comments
 (0)