ipc: restore long polling to websocket upgrade, seems necessary sometimes; disable compression
This commit is contained in:
parent
aa963ba248
commit
7dbe6ec8d1
2 changed files with 3 additions and 4 deletions
|
|
@ -2,7 +2,7 @@ var express = require('express')(),
|
|||
path = require('path'),
|
||||
http = require('http'),
|
||||
server = http.createServer(express),
|
||||
io = require('socket.io')(server, {transports:['websocket']}),
|
||||
io = require('socket.io')(server),
|
||||
ipc = {},
|
||||
settings = require('./settings'),
|
||||
zeroconf = require('./zeroconf'),
|
||||
|
|
|
|||
|
|
@ -5,15 +5,14 @@ var Ipc = class Ipc {
|
|||
|
||||
constructor() {
|
||||
|
||||
this.socket = io.connect('/', {transports: ['websocket'], upgrade: false})
|
||||
this.socket.compress(false)
|
||||
this.socket = io.connect('/')
|
||||
|
||||
}
|
||||
|
||||
|
||||
send(event, data) {
|
||||
|
||||
this.socket.emit(event, data)
|
||||
this.socket.compress(false).emit(event, data)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue