mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
Print message that marian-server is listening on port X after it is accepting connections (#705)
* Print 'server is listening' after it is accepting connections; fix #701 * Minor code formatting
This commit is contained in:
parent
9336746f89
commit
452f9c79e6
@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- Internal optional parameter in n-best list generation that skips empty hypotheses.
|
||||
|
||||
### Fixed
|
||||
- Print "server is listening on port" message after it is accepting connections
|
||||
- Fix compilation without BLAS installed
|
||||
- Providing a single value to vector-like options using the equals sign, e.g. --models=model.npz
|
||||
- Fix quiet-translation in marian-server
|
||||
|
@ -37,9 +37,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
// Send translation back
|
||||
connection->send(sendStream, [](const SimpleWeb::error_code &ec) {
|
||||
if(ec) {
|
||||
if(ec)
|
||||
LOG(error, "Error sending message: ({}) {}", ec.value(), ec.message());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -52,8 +51,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
// Start server thread
|
||||
std::thread serverThread([&server]() {
|
||||
LOG(info, "Server is listening on port {}", server.config.port);
|
||||
server.start();
|
||||
server.start([](unsigned short port) {
|
||||
LOG(info, "Server is listening on port {}", port);
|
||||
});
|
||||
});
|
||||
|
||||
serverThread.join();
|
||||
|
Loading…
Reference in New Issue
Block a user