File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
common/src/main/java/org/jboss/as/arquillian/container Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 12
12
import java .net .DatagramSocket ;
13
13
import java .net .ServerSocket ;
14
14
import java .net .Socket ;
15
+ import java .util .concurrent .CancellationException ;
15
16
import java .util .concurrent .TimeUnit ;
16
17
import java .util .concurrent .TimeoutException ;
17
18
@@ -196,11 +197,18 @@ protected void stopInternal(final Integer timeout) throws LifecycleException {
196
197
logger .error ("The management client does not seem to be active. Forcibly destroying the process." );
197
198
process .destroyForcibly ();
198
199
} else {
199
- final ModelNode result = client .getControllerClient ().execute (op );
200
- if (!Operations .isSuccessfulOutcome (result )) {
200
+ String shutdownFailureMessage = null ;
201
+ try {
202
+ final ModelNode result = client .getControllerClient ().execute (op );
203
+ if (!Operations .isSuccessfulOutcome (result )) {
204
+ shutdownFailureMessage = Operations .getFailureDescription (result ).asString ();
205
+ }
206
+ } catch (CancellationException ce ) {
207
+ shutdownFailureMessage = ce .toString ();
208
+ }
209
+ if (shutdownFailureMessage != null ) {
201
210
// Don't fail stopping, but we should log an error
202
- logger .errorf ("Failed to shutdown the server: %s" ,
203
- Operations .getFailureDescription (result ).asString ());
211
+ logger .errorf ("Failed to shutdown the server: %s" , shutdownFailureMessage );
204
212
process .destroyForcibly ();
205
213
}
206
214
}
You can’t perform that action at this time.
0 commit comments