Skip to content

Commit

Permalink
fix(pixelflut): Remove unused data variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ffflorian committed Dec 3, 2024
1 parent 075d6b0 commit bfc5106
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/pixelflut/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ export class Pixelflut {
}
}

public createTCPConnection(): Promise<string | void> {
public createTCPConnection(): Promise<string | undefined> {
return new Promise((resolve, reject) => {
let data: string;
let data: string | undefined;

this.tcpSocket = new net.Socket();

this.tcpSocket
.on('data', bytes => (data += bytes.toString('utf8')))
.on('data', bytes => {
data += bytes.toString('utf8');
})
.on('error', error => {
if (this.failed(error.message)) {
reject(error);
Expand All @@ -53,10 +55,8 @@ export class Pixelflut {
public createUDPConnection(): Promise<void> {
return new Promise((resolve, reject) => {
this.udpSocket = dgram.createSocket('udp4');
let data: string;

this.udpSocket
.on('data', bytes => (data += bytes.toString('utf8')))
.on('error', error => {
if (this.failed(error.message)) {
reject(error);
Expand Down

0 comments on commit bfc5106

Please sign in to comment.