Skip to content

Commit 89a4bec

Browse files
committed
Avoid dependency on ext-filter
1 parent 8c8abce commit 89a4bec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function resolveAddress($address)
123123
protected function resolveHost($host)
124124
{
125125
// there's no need to resolve if the host is already given as an IP address
126-
if (false !== \filter_var($host, \FILTER_VALIDATE_IP)) {
126+
if (@\inet_pton($host) !== false) {
127127
return Promise\resolve($host);
128128
}
129129

0 commit comments

Comments
 (0)