Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Websocket connections get reset when opening up 2 pages with websocket functionality #40

@johanos

Description

@johanos

When you open up the data collection page and the specify page, you reset the websocket connection

This, I believe, is due to the implementation.
var currentWebsocket = require('./websocket');
this gets called in any controller that uses websocket functionality. then you access the socket from the export in websocket.js.
currentWebsocket.socket();

then this is used to emit.

files affected = translateLFR.js, compileMint.js, serialcommunication.js

what I believe the issue is, is that when a page reloads (and a controller is reloaded) it will go through the process of handshaking the websocket connection again (and close it for the other page) so the last page that was open (if it used websockets) would have no functionality.

LOOK INTO: trying to unify everything into app.js, so that there is a single websocket connection (generated once, not in every controller) and then manage that since app.js is persistent through the life of the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions