refactor: refine code

This commit is contained in:
avwo
2022-05-24 14:01:56 +08:00
parent 71b4beaa8f
commit 7e04bbae4f
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -584,8 +584,8 @@ function resolveWebsocket(socket, wss) {
}
clearTimeout(timeout);
var clientId = headers[config.CLIENT_ID_HEADER];
if (clientId && !proxyUrl) {
if (!options.isPlugin && !socket._customClientId && !util.isKeepClientId(socket)) {
if (clientId) {
if (!options.isPlugin && !socket._customClientId && !util.isKeepClientId(socket, proxyUrl)) {
socket._origClientId = clientId;
util.removeClientId(headers);
}