Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,10 @@ public Future<Void> startAsync() {
int actualPort = local.getPort();
configCopy.setPort(actualPort);
configuration.setPort(actualPort);
} catch (Exception ignore) {
} catch (Exception e) {
// keep configured port if localAddress is not InetSocketAddress
log.debug("Could not resolve actual bound port, keeping configured port {}",
configCopy.getPort(), e);
}
}
serverStatus.set(ServerStatus.STARTED);
Expand All @@ -618,7 +620,7 @@ public Future<Void> startAsync() {
fireAfterStart();
} else {
serverStatus.set(ServerStatus.INIT);
log.error("Failed to start server on port {}", configCopy.getPort());
log.error("Failed to start server on port {}", configCopy.getPort(), future.cause());
cleanUpResources(false);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ private void readVersion() throws IOException {
version = name + "/" + attrs.getValue("Bundle-Version");
break;
}
} catch (IOException E) {
// skip it
} catch (IOException e) {
// A single unreadable manifest must not prevent reading the others
log.debug("Skipping unreadable MANIFEST.MF while resolving version header", e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ private void handleMessage(FullHttpRequest req, UUID sessionId, QueryStringDecod
String origin = req.headers().get(HttpHeaderNames.ORIGIN);
if (queryDecoder.parameters().containsKey("disconnect")) {
ClientHead client = clientsBox.get(sessionId);
if (client == null) {
log.error("{} is not registered. Closing connection", sessionId);
sendError(ctx);
return;
}
client.onChannelDisconnect();
ctx.channel().writeAndFlush(new XHRPostMessage(origin, sessionId));
} else if (HttpMethod.POST.equals(req.method())) {
Expand Down
Loading