File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,11 @@ class ProtocolFactory
33
33
public function createProtocol (IConnection $ connection , AuthenticateInterface $ auth , string $ userAgent ): array
34
34
{
35
35
$ bolt = new Bolt ($ connection );
36
- $ bolt ->setProtocolVersions (5.4 , 5.3 , 5 , 4.4 );
37
-
38
- try {
39
- $ protocol = $ bolt ->build ();
40
- } catch (ConnectException $ e ) {
41
- // Assume incorrect protocol version
42
- $ bolt ->setProtocolVersions (5.2 , 5.1 );
43
- $ protocol = $ bolt ->build ();
44
- }
36
+ $ bolt ->setProtocolVersions ('5.4.4 ' , 4.4 );
37
+ $ protocol = $ bolt ->build ();
45
38
46
39
if (!($ protocol instanceof V4_4 || $ protocol instanceof V5 || $ protocol instanceof V5_1 || $ protocol instanceof V5_2 || $ protocol instanceof V5_3 || $ protocol instanceof V5_4 )) {
47
- throw new RuntimeException ('Client only supports bolt version 4.4 and ^5.0 ' );
40
+ throw new RuntimeException ('Client only supports bolt version 4.4 to 5.4 ' );
48
41
}
49
42
50
43
$ response = $ auth ->authenticateBolt ($ protocol , $ userAgent );
You can’t perform that action at this time.
0 commit comments