Skip to content

Commit ed77f79

Browse files
author
Zhen Li
authored
Merge pull request #178 from lutovich/1.1-prefer-node-channel
Prefer node channel over websocket channel when both available
2 parents 34d8935 + 43c6d4c commit ed77f79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/v1/internal/connector.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import {Node, Relationship, UnboundRelationship, Path, PathSegment} from '../gra
2626
import {newError} from './../error';
2727

2828
let Channel;
29-
if( WebSocketChannel.available ) {
30-
Channel = WebSocketChannel.channel;
29+
if( NodeChannel.available ) {
30+
Channel = NodeChannel.channel;
3131
}
32-
else if( NodeChannel.available ) {
33-
Channel = NodeChannel.channel;
32+
else if( WebSocketChannel.available ) {
33+
Channel = WebSocketChannel.channel;
3434
}
3535
else {
3636
throw newError("Fatal: No compatible transport available. Need to run on a platform with the WebSocket API.");

0 commit comments

Comments
 (0)