springBoot websocket failed when network interruption
up vote
0
down vote
favorite
I connected to my websocket server successfully,but when I changed my network to test the broken network situation,it doesn't work as what I thought.
public class CallHandler extends TextWebSocketHandler {
@Override
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
log.info("after connection closed");
}
@Override
public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
log.info("handle Transport Error");
}
}
When I closed my network or from wifi to 4G, the afterConnectionClosed method or handleTransportError method does not execute.why and what should I do.
java spring-boot websocket
add a comment |
up vote
0
down vote
favorite
I connected to my websocket server successfully,but when I changed my network to test the broken network situation,it doesn't work as what I thought.
public class CallHandler extends TextWebSocketHandler {
@Override
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
log.info("after connection closed");
}
@Override
public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
log.info("handle Transport Error");
}
}
When I closed my network or from wifi to 4G, the afterConnectionClosed method or handleTransportError method does not execute.why and what should I do.
java spring-boot websocket
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I connected to my websocket server successfully,but when I changed my network to test the broken network situation,it doesn't work as what I thought.
public class CallHandler extends TextWebSocketHandler {
@Override
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
log.info("after connection closed");
}
@Override
public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
log.info("handle Transport Error");
}
}
When I closed my network or from wifi to 4G, the afterConnectionClosed method or handleTransportError method does not execute.why and what should I do.
java spring-boot websocket
I connected to my websocket server successfully,but when I changed my network to test the broken network situation,it doesn't work as what I thought.
public class CallHandler extends TextWebSocketHandler {
@Override
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
log.info("after connection closed");
}
@Override
public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
log.info("handle Transport Error");
}
}
When I closed my network or from wifi to 4G, the afterConnectionClosed method or handleTransportError method does not execute.why and what should I do.
java spring-boot websocket
java spring-boot websocket
asked Nov 9 at 3:34
kakashi
12
12
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219474%2fspringboot-websocket-failed-when-network-interruption%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown