Skip to content

Commit

Permalink
Fix Simple HTTP server listening address (#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
komarevtsev-d authored Oct 10, 2024
1 parent 95d8ba2 commit e8fab9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cloud/blockstore/libs/disk_agent/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ void TBootstrap::InitHTTPServer()
Y_DEBUG_ABORT_UNLESS(!Initialized);

StubMonPageServer = std::make_unique<NCloud::NStorage::TSimpleHttpServer>(
Configs->Options->MonitoringAddress,
Configs->DiagnosticsConfig->GetNbsMonPort(),
"This node is not registered in the NodeBroker. See "
"\"DisableNodeBrokerRegisterationOnDevicelessAgent\" in the disk agent "
Expand Down
3 changes: 2 additions & 1 deletion cloud/storage/core/libs/http/simple_http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ bool TSimpleHttpServer::TRequest::Reply(void* /*threadSpecificResource*/)

////////////////////////////////////////////////////////////////////////////////

TSimpleHttpServer::TSimpleHttpServer(ui16 port, TString response)
TSimpleHttpServer::TSimpleHttpServer(TString host, ui16 port, TString response)
: Response(std::move(response))
{
THttpServer::TOptions options;
options.Host = std::move(host);
options.Port = port;
options.nThreads = 1;
options.KeepAliveEnabled = false;
Expand Down
2 changes: 1 addition & 1 deletion cloud/storage/core/libs/http/simple_http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TSimpleHttpServer: public THttpServer::ICallBack
std::unique_ptr<THttpServer> Server;

public:
TSimpleHttpServer(ui16 port, TString response);
TSimpleHttpServer(TString host, ui16 port, TString response);
~TSimpleHttpServer() override;

bool Start();
Expand Down

0 comments on commit e8fab9a

Please sign in to comment.