WebSocket connection can't reconnect after some time
I wrote some logic which represent near 200 websocet connection with exchange at the same time.I use third party api and it based on org.eclipse.jetty.websocket.api. I have this method which i had to override.
try {
URI uri = new URI(websocketBaseUrl + url);
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setTrustAll(true);
WebSocketClient client = new WebSocketClient(sslContextFactory);
client.setMaxIdleTimeout(0);
client.start();
return client.connect(adapter, uri).get();
} catch (URISyntaxException e) {
throw new BinanceApiException("URL Syntax error: " + e.getMessage());
} catch (Throwable e) {
throw new BinanceApiException("Websocket error: " + e.getMessage());
}
I added setIdleTimeout to it so that the connection is not lost when i don't recieve information for a long time.
Exchange close connection one time a day but for 2,3 sometimes 4 days it have been reconnected.But finally i get this:
java.nio.channels.ClosedChannelException: null at
org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:507) at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onIncompleteFlush(SslConnection.java:527)
at
org.eclipse.jetty.io.AbstractEndPoint$2.onIncompleteFlush(AbstractEndPoint.java:54)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:331) at
org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:372)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.flush(FrameFlusher.java:153)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.process(FrameFlusher.java:217)
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher.enqueue(FrameFlusher.java:382)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:614)
at
org.eclipse.jetty.websocket.client.io.WebSocketClientConnection.outgoingFrame(WebSocketClientConnection.java:72)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onConnectionStateChange(AbstractWebSocketConnection.java:473)
at
org.eclipse.jetty.websocket.common.io.IOState.notifyStateListeners(IOState.java:184)
at
org.eclipse.jetty.websocket.common.io.IOState.onReadFailure(IOState.java:498)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:666)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:289)
at
org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:149)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
at java.lang.Thread.run(Thread.java:748)
I find this question on stackoverflow but i can't see clear answer. Pls help.Thanks in advance.
java websocket
add a comment |
I wrote some logic which represent near 200 websocet connection with exchange at the same time.I use third party api and it based on org.eclipse.jetty.websocket.api. I have this method which i had to override.
try {
URI uri = new URI(websocketBaseUrl + url);
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setTrustAll(true);
WebSocketClient client = new WebSocketClient(sslContextFactory);
client.setMaxIdleTimeout(0);
client.start();
return client.connect(adapter, uri).get();
} catch (URISyntaxException e) {
throw new BinanceApiException("URL Syntax error: " + e.getMessage());
} catch (Throwable e) {
throw new BinanceApiException("Websocket error: " + e.getMessage());
}
I added setIdleTimeout to it so that the connection is not lost when i don't recieve information for a long time.
Exchange close connection one time a day but for 2,3 sometimes 4 days it have been reconnected.But finally i get this:
java.nio.channels.ClosedChannelException: null at
org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:507) at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onIncompleteFlush(SslConnection.java:527)
at
org.eclipse.jetty.io.AbstractEndPoint$2.onIncompleteFlush(AbstractEndPoint.java:54)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:331) at
org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:372)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.flush(FrameFlusher.java:153)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.process(FrameFlusher.java:217)
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher.enqueue(FrameFlusher.java:382)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:614)
at
org.eclipse.jetty.websocket.client.io.WebSocketClientConnection.outgoingFrame(WebSocketClientConnection.java:72)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onConnectionStateChange(AbstractWebSocketConnection.java:473)
at
org.eclipse.jetty.websocket.common.io.IOState.notifyStateListeners(IOState.java:184)
at
org.eclipse.jetty.websocket.common.io.IOState.onReadFailure(IOState.java:498)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:666)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:289)
at
org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:149)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
at java.lang.Thread.run(Thread.java:748)
I find this question on stackoverflow but i can't see clear answer. Pls help.Thanks in advance.
java websocket
add a comment |
I wrote some logic which represent near 200 websocet connection with exchange at the same time.I use third party api and it based on org.eclipse.jetty.websocket.api. I have this method which i had to override.
try {
URI uri = new URI(websocketBaseUrl + url);
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setTrustAll(true);
WebSocketClient client = new WebSocketClient(sslContextFactory);
client.setMaxIdleTimeout(0);
client.start();
return client.connect(adapter, uri).get();
} catch (URISyntaxException e) {
throw new BinanceApiException("URL Syntax error: " + e.getMessage());
} catch (Throwable e) {
throw new BinanceApiException("Websocket error: " + e.getMessage());
}
I added setIdleTimeout to it so that the connection is not lost when i don't recieve information for a long time.
Exchange close connection one time a day but for 2,3 sometimes 4 days it have been reconnected.But finally i get this:
java.nio.channels.ClosedChannelException: null at
org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:507) at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onIncompleteFlush(SslConnection.java:527)
at
org.eclipse.jetty.io.AbstractEndPoint$2.onIncompleteFlush(AbstractEndPoint.java:54)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:331) at
org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:372)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.flush(FrameFlusher.java:153)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.process(FrameFlusher.java:217)
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher.enqueue(FrameFlusher.java:382)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:614)
at
org.eclipse.jetty.websocket.client.io.WebSocketClientConnection.outgoingFrame(WebSocketClientConnection.java:72)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onConnectionStateChange(AbstractWebSocketConnection.java:473)
at
org.eclipse.jetty.websocket.common.io.IOState.notifyStateListeners(IOState.java:184)
at
org.eclipse.jetty.websocket.common.io.IOState.onReadFailure(IOState.java:498)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:666)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:289)
at
org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:149)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
at java.lang.Thread.run(Thread.java:748)
I find this question on stackoverflow but i can't see clear answer. Pls help.Thanks in advance.
java websocket
I wrote some logic which represent near 200 websocet connection with exchange at the same time.I use third party api and it based on org.eclipse.jetty.websocket.api. I have this method which i had to override.
try {
URI uri = new URI(websocketBaseUrl + url);
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setTrustAll(true);
WebSocketClient client = new WebSocketClient(sslContextFactory);
client.setMaxIdleTimeout(0);
client.start();
return client.connect(adapter, uri).get();
} catch (URISyntaxException e) {
throw new BinanceApiException("URL Syntax error: " + e.getMessage());
} catch (Throwable e) {
throw new BinanceApiException("Websocket error: " + e.getMessage());
}
I added setIdleTimeout to it so that the connection is not lost when i don't recieve information for a long time.
Exchange close connection one time a day but for 2,3 sometimes 4 days it have been reconnected.But finally i get this:
java.nio.channels.ClosedChannelException: null at
org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:507) at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onIncompleteFlush(SslConnection.java:527)
at
org.eclipse.jetty.io.AbstractEndPoint$2.onIncompleteFlush(AbstractEndPoint.java:54)
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:331) at
org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:372)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.flush(FrameFlusher.java:153)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher$Flusher.process(FrameFlusher.java:217)
at
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
at
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
at
org.eclipse.jetty.websocket.common.io.FrameFlusher.enqueue(FrameFlusher.java:382)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:614)
at
org.eclipse.jetty.websocket.client.io.WebSocketClientConnection.outgoingFrame(WebSocketClientConnection.java:72)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onConnectionStateChange(AbstractWebSocketConnection.java:473)
at
org.eclipse.jetty.websocket.common.io.IOState.notifyStateListeners(IOState.java:184)
at
org.eclipse.jetty.websocket.common.io.IOState.onReadFailure(IOState.java:498)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:666)
at
org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:289)
at
org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:149)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
at
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at
org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
at java.lang.Thread.run(Thread.java:748)
I find this question on stackoverflow but i can't see clear answer. Pls help.Thanks in advance.
java websocket
java websocket
edited Nov 27 '18 at 20:48
Joakim Erdfelt
32.6k45795
32.6k45795
asked Nov 26 '18 at 1:09
Vlad CheremisinVlad Cheremisin
164
164
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you want the connection to stay open if idle, you should configure your client this way:
client.setMaxIdleTimeout(Long.MAX_VALUE);
Setting maxIdleTimeout to 0 would have the opposite effect: Closing the connection as soon as it becomes idle.
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
1
Setting the Max IdleTimeout toLong.MAX_VALUEis only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)
– Joakim Erdfelt
Nov 26 '18 at 19:44
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f53473604%2fwebsocket-connection-cant-reconnect-after-some-time%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you want the connection to stay open if idle, you should configure your client this way:
client.setMaxIdleTimeout(Long.MAX_VALUE);
Setting maxIdleTimeout to 0 would have the opposite effect: Closing the connection as soon as it becomes idle.
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
1
Setting the Max IdleTimeout toLong.MAX_VALUEis only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)
– Joakim Erdfelt
Nov 26 '18 at 19:44
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
add a comment |
If you want the connection to stay open if idle, you should configure your client this way:
client.setMaxIdleTimeout(Long.MAX_VALUE);
Setting maxIdleTimeout to 0 would have the opposite effect: Closing the connection as soon as it becomes idle.
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
1
Setting the Max IdleTimeout toLong.MAX_VALUEis only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)
– Joakim Erdfelt
Nov 26 '18 at 19:44
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
add a comment |
If you want the connection to stay open if idle, you should configure your client this way:
client.setMaxIdleTimeout(Long.MAX_VALUE);
Setting maxIdleTimeout to 0 would have the opposite effect: Closing the connection as soon as it becomes idle.
If you want the connection to stay open if idle, you should configure your client this way:
client.setMaxIdleTimeout(Long.MAX_VALUE);
Setting maxIdleTimeout to 0 would have the opposite effect: Closing the connection as soon as it becomes idle.
edited Nov 27 '18 at 6:50
answered Nov 26 '18 at 6:21
frenchoverflowfrenchoverflow
964
964
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
1
Setting the Max IdleTimeout toLong.MAX_VALUEis only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)
– Joakim Erdfelt
Nov 26 '18 at 19:44
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
add a comment |
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
1
Setting the Max IdleTimeout toLong.MAX_VALUEis only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)
– Joakim Erdfelt
Nov 26 '18 at 19:44
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
I'll try it.Thanks.
– Vlad Cheremisin
Nov 26 '18 at 11:00
1
1
Setting the Max IdleTimeout to
Long.MAX_VALUE is only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)– Joakim Erdfelt
Nov 26 '18 at 19:44
Setting the Max IdleTimeout to
Long.MAX_VALUE is only going to keep Jetty's WebSocketClient from closing the connection. Other players in the network stack could close the connection on their own idle timeout configuration. (eg: the jvm network stack, the os network stack, the network itself, the http intermediaries, the remote network stack, the remote network server configuration, the remote websocket endpoint configuration, etc...)– Joakim Erdfelt
Nov 26 '18 at 19:44
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
Thanks.Now it's clear enough
– Vlad Cheremisin
Nov 27 '18 at 9:12
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f53473604%2fwebsocket-connection-cant-reconnect-after-some-time%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