Skip to content

Commit 4af2983

Browse files
author
wangzihao
committed
发布2.3.22
hotfix: bug# ServletFilePart.getInputStream在客户端主动close时,会出现空指针
1 parent 62c88ae commit 4af2983

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ github地址 : https://github.com/wangzihaogithub/spring-boot-protocol
149149
<dependency>
150150
<groupId>com.github.wangzihaogithub</groupId>
151151
<artifactId>spring-boot-protocol</artifactId>
152-
<version>2.3.21</version>
152+
<version>2.3.22</version>
153153
</dependency>
154154
```
155155

@@ -161,7 +161,7 @@ github地址 : https://github.com/wangzihaogithub/spring-boot-protocol
161161
<dependency>
162162
<groupId>com.github.wangzihaogithub</groupId>
163163
<artifactId>netty-servlet</artifactId>
164-
<version>2.3.21</version>
164+
<version>2.3.22</version>
165165
</dependency>
166166
```
167167

@@ -317,7 +317,7 @@ github地址 : https://github.com/wangzihaogithub/spring-boot-protocol
317317
<dependency>
318318
<groupId>com.github.wangzihaogithub</groupId>
319319
<artifactId>spring-boot-protocol</artifactId>
320-
<version>2.3.21</version>
320+
<version>2.3.22</version>
321321
</dependency>
322322

323323
2.编写代码
@@ -397,7 +397,7 @@ github地址 : https://github.com/wangzihaogithub/spring-boot-protocol
397397
<dependency>
398398
<groupId>com.github.wangzihaogithub</groupId>
399399
<artifactId>spring-boot-protocol</artifactId>
400-
<version>2.3.21</version>
400+
<version>2.3.22</version>
401401
</dependency>
402402

403403
2.编写代码
@@ -486,7 +486,7 @@ github地址 : https://github.com/wangzihaogithub/spring-boot-protocol
486486
<dependency>
487487
<groupId>com.github.wangzihaogithub</groupId>
488488
<artifactId>spring-boot-protocol</artifactId>
489-
<version>2.3.21</version>
489+
<version>2.3.22</version>
490490
</dependency>
491491
492492
2.编写启动类

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.github.wangzihaogithub</groupId>
66
<artifactId>spring-boot-protocol</artifactId>
7-
<version>2.3.21</version>
7+
<version>2.3.22</version>
88
<packaging>jar</packaging>
99

1010
<name>Spring Boot Protocol</name>
@@ -49,7 +49,7 @@
4949
<connection>scm:git:https://github.com/wangzihaogithub/spring-boot-protocol.git</connection>
5050
<developerConnection>scm:git:[email protected]:wangzihaogithub/spring-boot-protocol.git</developerConnection>
5151
<url>[email protected]:wangzihaogithub/spring-boot-protocol.git</url>
52-
<tag>v2.3.21</tag>
52+
<tag>v2.3.22</tag>
5353
</scm>
5454

5555
<!-- 开发者信息 -->

src/main/java/com/github/netty/protocol/servlet/NettyMessageToServletRunnable.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,14 @@ public Runnable onMessage(ChannelHandlerContext context, Object msg) {
131131
public Runnable onClose(ChannelHandlerContext context) {
132132
ServletHttpExchange exchange = this.exchange;
133133
if (exchange != null) {
134+
exchange.abort();
134135
if (exchange.isAsyncStartIng()) {
135-
exchange.abort();
136136
ServletAsyncContext asyncContext = exchange.getAsyncContext();
137137
if (asyncContext != null && !asyncContext.isComplete()) {
138138
asyncContext.complete(new ClosedChannelException());
139139
}
140-
} else if (exchange.closeStatus() == CLOSE_NO) {
141-
exchange.abort();
140+
exchange.close();
142141
}
143-
exchange.close();
144142
}
145143
return null;
146144
}

src/main/resources/server.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
server.info=Github Spring-boot-protocol/2.3.21
17-
server.number=2.3.21
18-
server.built=Jul 26 2024 13:41:32 UTC+8
16+
server.info=Github Spring-boot-protocol/2.3.22
17+
server.number=2.3.22
18+
server.built=Aug 6 2024 19:09:02 UTC+8

0 commit comments

Comments
 (0)