Skip to content

SetPort throws when called before Initialize #45

@caguiclajmg

Description

@caguiclajmg

VTSWebSocket.SetPort (and consequently CoreVTSPlugin.SetPort) throws when called before calling Initialize, presumably due to _logger being unset here at the time of the SetPort call:

public bool SetPort(int port) {
_logger.Log(string.Format("Setting port: {0}...", port));

This makes it impossible to pre-select the VTS instance you'd want to connect to. As a workaround, theoretically (haven't tried it yet) I should be able to do: Initialize -> SetPort -> Disconnect -> Initialize but that's super clunky.

PS: Is there any specific reason why some of the internals are lazily initialized (e.g. in Initialize instead of a constructor)?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions