You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://build.spring.io/browse/INTSAMPLES-NIGHTLY-2413
When we fail with the
`java.net.BindException: Address already in use (Bind failed)` in the
`TcpNetServerConnectionFactory.run()`, the `serverSocket` property
remains `null` and we get `NPE` in the `catch` block trying to `close()`
the socket.
* Call `stop()` instead which has all the required protections.
**Cherry-pick to 5.0.x and 4.3.x**
Copy file name to clipboardExpand all lines: spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNetServerConnectionFactory.java
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@
33
33
* a {@link ServerSocket}. Must have a {@link TcpListener} registered.
34
34
*
35
35
* @author Gary Russell
36
+
* @author Artem Bilan
37
+
*
36
38
* @since 2.0
37
39
*
38
40
*/
@@ -155,6 +157,7 @@ public void run() {
155
157
elseif (isActive()) {
156
158
logger.error("Error on ServerSocket; port = " + getPort(), e);
0 commit comments