Skip to content

Commit 259d0db

Browse files
committed
Compatibility with new version of netty
1 parent 2b91db7 commit 259d0db

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To add a dependency using Maven:
99
<dependency>
1010
<groupId>io.jpower.kcp</groupId>
1111
<artifactId>kcp-netty</artifactId>
12-
<version>1.4.10</version>
12+
<version>1.4.11</version>
1313
</dependency>
1414
```
1515

kcp-example/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.jpower.kcp</groupId>
77
<artifactId>kcp-parent</artifactId>
8-
<version>1.4.10</version>
8+
<version>1.4.11</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

kcp-netty/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.jpower.kcp</groupId>
77
<artifactId>kcp-parent</artifactId>
8-
<version>1.4.10</version>
8+
<version>1.4.11</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

kcp-netty/src/main/java/io/netty/bootstrap/UkcpServerBootstrap.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,13 @@ public UkcpServerBootstrap childHandler(ChannelHandler childHandler) {
9696
@Override
9797
void init(Channel channel) {
9898
setChannelOptions(channel, newOptionsArray(), logger);
99-
setAttributes(channel, attrs0().entrySet().toArray(EMPTY_ATTRIBUTE_ARRAY));
99+
setAttributes(channel, newAttributesArray());
100100

101101
ChannelPipeline p = channel.pipeline();
102102

103103
final ChannelHandler currentChildHandler = childHandler;
104-
final Entry<ChannelOption<?>, Object>[] currentChildOptions;
105-
synchronized (childOptions) {
106-
currentChildOptions = childOptions.entrySet().toArray(EMPTY_OPTION_ARRAY);
107-
}
108-
final Entry<AttributeKey<?>, Object>[] currentChildAttrs = childAttrs.entrySet().toArray(EMPTY_ATTRIBUTE_ARRAY);
104+
final Entry<ChannelOption<?>, Object>[] currentChildOptions = newOptionsArray(childOptions);
105+
final Entry<AttributeKey<?>, Object>[] currentChildAttrs = newAttributesArray(childAttrs);
109106

110107
p.addLast(new ChannelInitializer<Channel>() {
111108
@Override

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.jpower.kcp</groupId>
88
<artifactId>kcp-parent</artifactId>
9-
<version>1.4.10</version>
9+
<version>1.4.11</version>
1010
<packaging>pom</packaging>
1111

1212
<name>kcp-netty [Parent]</name>
@@ -18,7 +18,7 @@
1818

1919
<properties>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21-
<netty.version>4.1.52.Final</netty.version>
21+
<netty.version>4.1.67.Final</netty.version>
2222
<slf4j.version>1.7.30</slf4j.version>
2323
</properties>
2424

0 commit comments

Comments
 (0)