mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
scaling: include padId in socketio query string
This commit is contained in:
parent
0e854a5892
commit
2b98b930d7
3 changed files with 10 additions and 2 deletions
|
@ -52,12 +52,13 @@ const connect = async (res) => {
|
|||
([name, cookie]) => `${name}=${encodeURIComponent(cookie.value)}`).join('; ');
|
||||
|
||||
logger.debug('socket.io connecting...');
|
||||
const padId = res.req.path.split('/p/')[1];
|
||||
const socket = io(`${common.baseUrl}/`, {
|
||||
forceNew: true, // Different tests will have different query parameters.
|
||||
path: '/socket.io',
|
||||
// socketio.js-client on node.js doesn't support cookies (see https://git.io/JU8u9), so the
|
||||
// express_sid cookie must be passed as a query parameter.
|
||||
query: {cookie: reqCookieHdr},
|
||||
query: {cookie: reqCookieHdr, padId},
|
||||
});
|
||||
try {
|
||||
await getSocketEvent(socket, 'connect');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue