mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
bugfix/tests/scaling: Socket query test fix (#4974)
fix socketio test where res.req is not available.
This commit is contained in:
parent
2b98b930d7
commit
b80f5bdae8
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,10 @@ const connect = async (res) => {
|
|||
([name, cookie]) => `${name}=${encodeURIComponent(cookie.value)}`).join('; ');
|
||||
|
||||
logger.debug('socket.io connecting...');
|
||||
const padId = res.req.path.split('/p/')[1];
|
||||
let padId = null;
|
||||
if (res) {
|
||||
padId = res.req.path.split('/p/')[1];
|
||||
}
|
||||
const socket = io(`${common.baseUrl}/`, {
|
||||
forceNew: true, // Different tests will have different query parameters.
|
||||
path: '/socket.io',
|
||||
|
|
Loading…
Reference in a new issue