something something prevent npe
This commit is contained in:
parent
5c0beb61c7
commit
be6cc9c317
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ public class Main {
|
|||
wsConnectContext.send("connected");
|
||||
});
|
||||
ws.onClose(wsCloseContext -> {
|
||||
if (client.get() != null && client.get().session.equals(wsCloseContext.session)) {
|
||||
var c = client.get();
|
||||
if (c != null && c.session.equals(wsCloseContext.session)) {
|
||||
client.set(null);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue