Skip to content

Commit

Permalink
fix crash when upgrade to socket.io 3.0.0 (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyliang220 authored Nov 12, 2020
1 parent 0fa69b4 commit db0aa96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const self = require('./package')

const app = express()
, server = http.createServer(app)
, io = socket.listen(server)
, io = socket(server)
, Sink = sink.Sink
, version = self.version
;
Expand All @@ -46,7 +46,7 @@ l10n.setLanguage('en_GB');

server.listen(process.argv[2] || process.env.PORT || DEFAULT_PORT);

io.sockets.on("connection", function (socket) {
io.on("connection", function (socket) {
socket.emit("handshake", { version: version });
socket.on("extractMetadata", function (data) {
if (!data.url) return socket.emit("exception", { message: "URL not provided." });
Expand Down

0 comments on commit db0aa96

Please sign in to comment.