File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/org/iris_events/router/ws Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -95,11 +95,13 @@ private boolean checkForBannedClient(Map<String, List<String>> headers) {
9595 @ OnOpen
9696 public void onOpen (Session session , EndpointConfig conf ) {
9797 try {
98- final var irisSessionId = (String ) conf .getUserProperties ().get (IRIS_SESSION_ID_HEADER );
98+ //final var irisSessionId = (String) conf.getUserProperties().get(IRIS_SESSION_ID_HEADER);
99+ // todo session id should be generated while doing handshake as it is returned as header on upgrade,
100+ // but there is no reliable way to share state between ws configurator and endpoint, for now we are generating it here,
101+ // which will break mdc session id tracking between clients end backend, but better than having same session id for multiple web socket sessions.
102+ final var irisSessionId = UUID .randomUUID ().toString ();
99103 MDC .put (MDCProperties .SESSION_ID , irisSessionId );
100104
101-
102-
103105 Map <String , List <String >> headers = Optional
104106 .ofNullable ((Map <String , List <String >>) conf .getUserProperties ().remove ("headers" ))
105107 .orElse (Collections .emptyMap ());
You can’t perform that action at this time.
0 commit comments