Skip to content

Commit

Permalink
fix udp socket handling
Browse files Browse the repository at this point in the history
  • Loading branch information
foomoon committed Dec 14, 2023
1 parent d8f1fd6 commit eee5dab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dist/lib/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ export class Light {
timeout: timeout,
});
this.activeLoginCall = false;
this.udpClient = udp.createSocket("udp4");
if (typeof window === "undefined") {
this.udpClient = udp.createSocket("udp4");
}
else {
this.udpClient = new udp.Socket();
}
}
autoEndLoginCall() {
return __awaiter(this, void 0, void 0, function* () {
Expand Down

0 comments on commit eee5dab

Please sign in to comment.