-
Notifications
You must be signed in to change notification settings - Fork 33
Description
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.