Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GPSDEndpoint constructor fails if GPSD has not been started yet #25

@balazs-zsoldos

Description

@balazs-zsoldos

In the constructor of the GPSDEndpoint class the Socket to GPSD is opened. That means that GPSD must work before the constructor of the GPSDEndpoint is called.

On the other hand, after successfully constructing the GPSDEndpoint class, the client will reconnect if the GPSD goes away for an amount of time.

It would be nice if the GPSDEndpoint class was start-order independent, so the constructor would not open the socket, but network connection would be made only after start is called in a fail-safe mode.

Also, the start method of GPSDEndpoint sleeps for half a second before returning for no mentioned reason. If that sleep is there to be sure that some flag is set by the started Thread, lock objects should be used instead of sleeping so the startup thread of an application does not have to hang for half a second.

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