Explorar el Código

Support Fully qualified name for Protocols

sm2017 hace 7 años
padre
commit
09a0edb939
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Worker.php

+ 1 - 1
Worker.php

@@ -1928,7 +1928,7 @@ class Worker
             // Check application layer protocol class.
             if (!isset(static::$_builtinTransports[$scheme])) {
                 $scheme         = ucfirst($scheme);
-                $this->protocol = '\\Protocols\\' . $scheme;
+                $this->protocol = substr($scheme,0,1)==='\\'?$scheme:'\\Protocols\\' . $scheme;
                 if (!class_exists($this->protocol)) {
                     $this->protocol = "\\Workerman\\Protocols\\$scheme";
                     if (!class_exists($this->protocol)) {