Skip to content

Commit 43c6d4c

Browse files
committed
Prefer node channel over websocket channel when both available
Fixes #154
1 parent 34d8935 commit 43c6d4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/v1/internal/connector.js

Lines changed: 4 additions & 4 deletions
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)