Skip to content

NullPointerException on Windows #1

Closed
@JAAdrian

Description

@JAAdrian

Hi,

thanks for the great code!
But I get a java.lang.NullPointerException on a Windows machine when I try to open a socket for a second time after deleting the previous socket (stacktrace see image).

I can reproduce this with the provided demo echoServer by calling it first

x = echoServer(30000)

and opening the client2.html file. The websocket connects. After closing the connection via the website I delete the object in MATLAB.

delete(x)

When I try to open a new websocket by

y = echoServer(30000)

I get the following error everytime.

screenshot 1

This hasn't happened on a Unix machine so far.

Update:
Using a different port everytime a new websocket is established seems to work. I really would like to have the port static on the client side. Does MATLAB lock the port somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions