mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 14:12:25 +00:00
fix boost crash
This commit is contained in:
+5
-3
@@ -1,11 +1,10 @@
|
|||||||
#include "Http.h"
|
#include "Http.h"
|
||||||
|
|
||||||
|
#include "Common.h"
|
||||||
#include <boost/asio/connect.hpp>
|
#include <boost/asio/connect.hpp>
|
||||||
#include <boost/asio/ip/tcp.hpp>
|
#include <boost/asio/ip/tcp.hpp>
|
||||||
#include <boost/beast.hpp>
|
#include <boost/beast.hpp>
|
||||||
#include <boost/beast/ssl.hpp>
|
#include <boost/beast/ssl.hpp>
|
||||||
#include "Common.h"
|
|
||||||
|
|
||||||
namespace beast = boost::beast; // from <boost/beast.hpp>
|
namespace beast = boost::beast; // from <boost/beast.hpp>
|
||||||
namespace http = beast::http; // from <boost/beast/http.hpp>
|
namespace http = beast::http; // from <boost/beast/http.hpp>
|
||||||
@@ -140,5 +139,8 @@ std::string Http::POST(const std::string& host, const std::string& target, const
|
|||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
error(e.what());
|
error(e.what());
|
||||||
return "-1";
|
return "-1";
|
||||||
|
} catch (const boost::system::system_error& e) {
|
||||||
|
error(e.what());
|
||||||
|
return "-1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user