Skip to content

Commit 91166f9

Browse files
committed
Review comments
1 parent c142c56 commit 91166f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/database/src/realtime/WebSocketConnection.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export class WebSocketConnection implements Transport {
7676
private stats_: StatsCollection;
7777
private everConnected_: boolean;
7878
private isClosed_: boolean;
79+
private nodeAdmin: boolean;
7980

8081
/**
8182
* @param connId identifier for this transport
@@ -87,7 +88,7 @@ export class WebSocketConnection implements Transport {
8788
*/
8889
constructor(
8990
public connId: string,
90-
private repoInfo: RepoInfo,
91+
repoInfo: RepoInfo,
9192
private applicationId?: string,
9293
transportSessionId?: string,
9394
lastSessionId?: string
@@ -99,6 +100,7 @@ export class WebSocketConnection implements Transport {
99100
transportSessionId,
100101
lastSessionId
101102
);
103+
this.nodeAdmin = repoInfo.nodeAdmin;
102104
}
103105

104106
/**
@@ -151,7 +153,7 @@ export class WebSocketConnection implements Transport {
151153

152154
try {
153155
if (isNodeSdk()) {
154-
const device = this.repoInfo.nodeAdmin ? 'AdminNode' : 'Node';
156+
const device = this.nodeAdmin ? 'AdminNode' : 'Node';
155157
// UA Format: Firebase/<wire_protocol>/<sdk_version>/<platform>/<device>
156158
const options: { [k: string]: object } = {
157159
headers: {

0 commit comments

Comments
 (0)