Try to fix some stuff with websocket
This commit is contained in:
parent
fdfb67757f
commit
2fb4775ca7
@ -110,7 +110,7 @@ public abstract class AbstractClientWS implements AbstractWS {
|
|||||||
public final void sendClose(int code, String reason) throws IOException {
|
public final void sendClose(int code, String reason) throws IOException {
|
||||||
synchronized (socket) {
|
synchronized (socket) {
|
||||||
autoReconnect = false; // if we ask for closing connection, dont reconnect automatically
|
autoReconnect = false; // if we ask for closing connection, dont reconnect automatically
|
||||||
socket.get().sendClose(code, reason);
|
socket.get().sendClose(code, reason).join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package fr.pandacube.lib.ws.payloads;
|
package fr.pandacube.lib.ws.payloads;
|
||||||
|
|
||||||
|
import fr.pandacube.lib.util.ThrowableUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error message payload.
|
* Error message payload.
|
||||||
*/
|
*/
|
||||||
@ -11,7 +13,7 @@ public class ErrorPayload extends Payload {
|
|||||||
/**
|
/**
|
||||||
* The error Throwable, may be null.
|
* The error Throwable, may be null.
|
||||||
*/
|
*/
|
||||||
public Throwable throwable;
|
public String exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize an error payload with a message but not throwable.
|
* Initialize an error payload with a message but not throwable.
|
||||||
@ -28,7 +30,7 @@ public class ErrorPayload extends Payload {
|
|||||||
*/
|
*/
|
||||||
public ErrorPayload(String message, Throwable throwable) {
|
public ErrorPayload(String message, Throwable throwable) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.throwable = throwable;
|
this.exception = ThrowableUtil.stacktraceToString(throwable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
Loading…
Reference in New Issue
Block a user