Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
修复添加两个 httpAggregator 的问题,方法名修正
Browse files Browse the repository at this point in the history
  • Loading branch information
KasumiNova committed Sep 29, 2022
1 parent 14db5f7 commit c2839e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static void init() {
//定义变量
IntegratedServerInterface serverInterface = availableCustomServerInterfaces.get(tabIndex);
String serverName = serverInterface.getServerName();
if (!stopLittleServer(serverInterface, serverName, tabIndex, true)) return;
if (!stopIntegratedServer(serverInterface, serverName, tabIndex, true)) return;

SERVER_TABBED_PANE.removeTabAt(tabIndex);
availableCustomServerInterfaces.remove((int) tabIndex);
Expand Down Expand Up @@ -210,7 +210,7 @@ public static void stopAllServers(boolean inquireUser) {
//停止所有运行的实例
for (int i = 0; i < availableCustomServerInterfaces.size(); i++) {
IntegratedServerInterface serverInterface = availableCustomServerInterfaces.get(i);
stopLittleServer(serverInterface, serverInterface.getServerName(), i, inquireUser);
stopIntegratedServer(serverInterface, serverInterface.getServerName(), i, inquireUser);
if (i != 0) {
SERVER_TABBED_PANE.removeTabAt(i);
availableCustomServerInterfaces.remove(i);
Expand Down Expand Up @@ -406,7 +406,7 @@ private static void loadMenuBar() {
IntegratedServerInterface serverInterface = availableCustomServerInterfaces.get(selected);
String serverName = serverInterface.getServerName();

if (stopLittleServer(serverInterface, serverName, selected, true)) {
if (stopIntegratedServer(serverInterface, serverName, selected, true)) {
GLOBAL_THREAD_POOL.execute(() -> {
IntegratedServer littleServer;
if (serverName.equals("littleserver")) {
Expand All @@ -433,7 +433,7 @@ private static void loadMenuBar() {
* @param inquireUser 是否向用户确认关闭服务端
* @return 用户是否确认关闭了服务器
*/
private static boolean stopLittleServer(IntegratedServerInterface serverInterface, String serverName, int index, boolean inquireUser) {
private static boolean stopIntegratedServer(IntegratedServerInterface serverInterface, String serverName, int index, boolean inquireUser) {
boolean isStarted = serverInterface.isStarted().get();
//如果服务器已启动,则提示是否关闭服务器
if (isStarted) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ protected void initChannel(SocketChannel channel) throws Exception {
//反向代理适配器
pipeline.addLast("decoder",new DecodeProxy(logger));
pipeline.addLast(new HttpServerCodec());
pipeline.addLast("httpAggregator",new HttpObjectAggregator(512 * 1024));
pipeline.addLast("http-chunked",new ChunkedWriteHandler());
//gzip 压缩
// pipeline.addLast("compressor",new HttpContentCompressor());
Expand Down

0 comments on commit c2839e2

Please sign in to comment.