Skip to content

Commit

Permalink
refactor: cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Sep 25, 2024
1 parent 5e9a91f commit af3d113
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dpp/discordvoiceclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,13 +719,13 @@ bool discord_voice_client::handle_frame(const std::string &data, ws_opcode opcod

/* Hook poll() in the ssl_client to add a new file descriptor */
this->fd = newfd;
this->custom_writeable_fd = std::bind(&discord_voice_client::want_write, this);
this->custom_readable_fd = std::bind(&discord_voice_client::want_read, this);
this->custom_writeable_ready = std::bind(&discord_voice_client::write_ready, this);
this->custom_readable_ready = std::bind(&discord_voice_client::read_ready, this);
this->custom_writeable_fd = [this] { return want_write(); };
this->custom_readable_fd = [this] { return want_read(); };
this->custom_writeable_ready = [this] { write_ready(); };
this->custom_readable_ready = [this] { read_ready(); };

int bound_port = 0;
sockaddr_in sin;
sockaddr_in sin{};
socklen_t len = sizeof(sin);
if (getsockname(this->fd, (sockaddr *)&sin, &len) > -1) {
bound_port = ntohs(sin.sin_port);
Expand Down

0 comments on commit af3d113

Please sign in to comment.