Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
fawdlstty committed Apr 22, 2021
1 parent 5c7566f commit 67bf876
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xfinal/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ namespace xfinal {
cancel_keep_timer();
auto ws = handler->router_.websokcets().start_webscoket(view2str(handler->req_.get_event_index_str()));
ws->user_data_ = req_.move_user_data();
ws->key_params().swap(req_.key_params());
ws->decode_url_params_ = req_.key_params ();
ws->move_socket(std::move(handler->socket_));
}
});
Expand Down
2 changes: 1 addition & 1 deletion xfinal/http_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace xfinal {
return {};
}

std::map<std::string, std::string> &key_params() noexcept { //获取问号键值对的map
std::map<std::string, std::string> key_params() const noexcept { //获取问号键值对的map
return decode_url_params_;
}

Expand Down
2 changes: 1 addition & 1 deletion xfinal/websokcet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace xfinal {
asio::ip::tcp::socket& socket() {
return *socket_;
}
std::map<std::string, std::string> &key_params () noexcept {
std::map<std::string, std::string> key_params () const noexcept {
return decode_url_params_;
}
private:
Expand Down

0 comments on commit 67bf876

Please sign in to comment.