This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new b93c4f0 royaleunit-ant-tasks: fixed issue where socket close timeout
caused tests to fail because the port was considered in use
b93c4f0 is described below
commit b93c4f0c08c1a46953e815abb135b1894155a61d
Author: Josh Tynjala <[email protected]>
AuthorDate: Fri Jun 28 11:57:52 2019 -0700
royaleunit-ant-tasks: fixed issue where socket close timeout caused tests
to fail because the port was considered in use
---
.../java/org/apache/royale/test/ant/RoyaleUnitWebSocketServer.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/RoyaleUnitWebSocketServer.java
b/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/RoyaleUnitWebSocketServer.java
index 2d84f0e..925e367 100644
---
a/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/RoyaleUnitWebSocketServer.java
+++
b/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/RoyaleUnitWebSocketServer.java
@@ -38,6 +38,10 @@ public class RoyaleUnitWebSocketServer extends
WebSocketServer implements IRoyal
{
super(new InetSocketAddress(port));
this.timeout = timeout;
+ //because we may be running many sets of tests in a short period of
+ //time, and the socket can end up in a timeout state after it is
closed,
+ //this allows us to reuse the same port again quickly
+ this.setReuseAddr(true);
}
private int timeout;