diff --git a/HubConnectionOptions.go b/HubConnectionOptions.go index f24e668..0cee9bd 100644 --- a/HubConnectionOptions.go +++ b/HubConnectionOptions.go @@ -17,6 +17,12 @@ type HubConnectionOptions struct { func (this *HubConnectionOptions) prepareConnection() *HubConnection { if this.Self.ClientTag == "" { this.Self.ClientTag = DEFAULT_CLIENT_TAG + this.Self.ClientVersion = DEFAULT_CLIENT_VERSION + } + + // Shouldn't be blank either + if this.Self.ClientVersion == "" { + this.Self.ClientVersion = "0" } hc := HubConnection{ diff --git a/libnmdc.go b/libnmdc.go index ee75c58..48709a2 100644 --- a/libnmdc.go +++ b/libnmdc.go @@ -9,10 +9,11 @@ import ( ) const ( - DEFAULT_CLIENT_TAG string = "libnmdc.go" - DEFAULT_HUB_NAME string = "(unknown)" - SEND_KEEPALIVE_EVERY time.Duration = 29 * time.Second - AUTO_RECONNECT_AFTER time.Duration = 30 * time.Second + DEFAULT_CLIENT_TAG string = "libnmdc.go" + DEFAULT_CLIENT_VERSION string = "0.11" + DEFAULT_HUB_NAME string = "(unknown)" + SEND_KEEPALIVE_EVERY time.Duration = 29 * time.Second + AUTO_RECONNECT_AFTER time.Duration = 30 * time.Second ) var rx_protocolMessage *regexp.Regexp