Reputation: 11
I'm getting an issue when running vertx on a Unix server. When full message is received the end handler does not work.
HttpClientRequest request = client.post (8580, "localhost", "/", response ->
{
if (response.statusCode () == 200) {
response.handler (t -> {
LOG.info ("RECEIVE DATA: " + t.toString ());
});
response.endHandler (t -> {
LOG.info ("endHandler: DONE"); //DO NOT PRINT ON LOG FILE
});
} else {
LOG.info ("Sent error:"+response.statusMessage ());
}
});
My source demo: https://github.com/blueskyvn/vertx_client.
Upvotes: 1
Views: 189
Reputation: 1007
client.close();
line to the response handler.HttpVerticle
class and call it after server is started. Use listen method with callback.Upvotes: 1