Rewritten sub protocols string building
This commit is contained in:
parent
399d22550a
commit
cc1717030f
@ -200,15 +200,15 @@ class WsServer implements MessageComponentInterface {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$string = '';
|
$result = array();
|
||||||
|
|
||||||
foreach ($requested as $sub) {
|
foreach ($requested as $sub) {
|
||||||
if ($this->isSubProtocolSupported($sub)) {
|
if ($this->isSubProtocolSupported($sub)) {
|
||||||
$string .= $sub . ',';
|
$result[] = $sub;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return substr($string, 0, -1) ?: '';
|
return implode(',', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user