Skip to content

Commit

Permalink
refactor: remove unused line
Browse files Browse the repository at this point in the history
In Socket.IO v2, the Socket `query` option was sent when connecting to
a custom namespace (but not for the main namespace).

This was fixed in Socket.IO v3 ([1]), so this line is now useless.

[1]: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/#Add-a-clear-distinction-between-the-Manager-query-option-and-the-Socket-query-option
  • Loading branch information
darrachequesne committed Jan 28, 2021
1 parent 5529f34 commit 0a63a17
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/manager.ts
Expand Up @@ -631,7 +631,6 @@ export class Manager extends Emitter {
*/
_packet(packet: Partial<Packet & { query: string; options: any }>) {
debug("writing packet %j", packet);
if (packet.query && packet.type === 0) packet.nsp += "?" + packet.query;

const encodedPackets = this.encoder.encode(packet as Packet);
for (let i = 0; i < encodedPackets.length; i++) {
Expand Down

0 comments on commit 0a63a17

Please sign in to comment.