Skip to content

Commit

Permalink
Fix order of setting socket option
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSimpson committed Feb 17, 2018
1 parent ba6887c commit df2ff4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Builder/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ int main(int argc, char *argv[]) {
tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v4(), 8080));

try {
// Use keep alive, which hopefully detect badly disconnected clients
boost::asio::socket_base::keep_alive keep_alive(true);
socket.set_option(keep_alive);

Logger::info("Accepting an in coming websocket connection");
acceptor.accept(client_stream.next_layer());
client_stream.accept();

// Use keep alive, which hopefully detect badly disconnected clients
boost::asio::socket_base::keep_alive keep_alive(true);
socket.set_option(keep_alive);

Logger::info("Setting the websocket stream to handle binary data and have an unlimited(uint64_t) message size");
client_stream.binary(true);
client_stream.read_message_max(0);
Expand Down

0 comments on commit df2ff4f

Please sign in to comment.