Changed sslConf parameter validation, according to review on PR
This commit is contained in:
parent
369227dc1c
commit
13c9fdfb15
@ -65,10 +65,10 @@ class IoServer {
|
||||
* @param string $address The address to receive sockets on (0.0.0.0 means receive connections from any)
|
||||
* @return IoServer
|
||||
*/
|
||||
public static function factory(MessageComponentInterface $component, $port = 80, $address = '0.0.0.0', $sslconf = array()) {
|
||||
public static function factory(MessageComponentInterface $component, $port = 80, $address = '0.0.0.0', $sslconf = null) {
|
||||
$loop = LoopFactory::create();
|
||||
$socket = new Reactor($loop);
|
||||
if (!empty($sslconf)) {
|
||||
if (is_array($sslconf)) {
|
||||
$socket = new SecureReactor($socket, $loop, $sslconf);
|
||||
}
|
||||
$socket->listen($port, $address);
|
||||
|
Loading…
Reference in New Issue
Block a user