From 295a97c6d60bd59dab8fbc9cbcc3f9d158f70687 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Mon, 4 Apr 2016 17:48:44 +0200 Subject: [PATCH] Update github.com/eclipse/paho.mqtt.golang vendor. --- backend/mqttpubsub/backend.go | 6 +- backend/mqttpubsub/backend_test.go | 5 +- .../eclipse/paho.mqtt.golang}/CONTRIBUTING.md | 21 +---- .../eclipse/paho.mqtt.golang}/DISTRIBUTION | 0 .../eclipse/paho.mqtt.golang}/LICENSE | 0 .../eclipse/paho.mqtt.golang}/README.md | 12 +-- .../eclipse/paho.mqtt.golang}/about.html | 0 .../eclipse/paho.mqtt.golang}/client.go | 85 +++++++++++-------- .../eclipse/paho.mqtt.golang}/components.go | 0 .../eclipse/paho.mqtt.golang}/edl-v10 | 0 .../eclipse/paho.mqtt.golang}/epl-v10 | 0 .../eclipse/paho.mqtt.golang}/filestore.go | 2 +- .../eclipse/paho.mqtt.golang}/memstore.go | 2 +- .../eclipse/paho.mqtt.golang}/message.go | 2 +- .../eclipse/paho.mqtt.golang}/messageids.go | 0 .../eclipse/paho.mqtt.golang}/net.go | 55 +++++------- .../eclipse/paho.mqtt.golang}/notice.html | 0 .../eclipse/paho.mqtt.golang}/oops.go | 0 .../eclipse/paho.mqtt.golang}/options.go | 6 +- .../paho.mqtt.golang}/packets/connack.go | 0 .../paho.mqtt.golang}/packets/connect.go | 0 .../paho.mqtt.golang}/packets/disconnect.go | 0 .../paho.mqtt.golang}/packets/packets.go | 0 .../paho.mqtt.golang}/packets/pingreq.go | 0 .../paho.mqtt.golang}/packets/pingresp.go | 0 .../paho.mqtt.golang}/packets/puback.go | 0 .../paho.mqtt.golang}/packets/pubcomp.go | 0 .../paho.mqtt.golang}/packets/publish.go | 0 .../paho.mqtt.golang}/packets/pubrec.go | 0 .../paho.mqtt.golang}/packets/pubrel.go | 0 .../paho.mqtt.golang}/packets/suback.go | 0 .../paho.mqtt.golang}/packets/subscribe.go | 0 .../paho.mqtt.golang}/packets/unsuback.go | 0 .../paho.mqtt.golang}/packets/unsubscribe.go | 0 .../eclipse/paho.mqtt.golang}/ping.go | 4 +- .../eclipse/paho.mqtt.golang}/router.go | 4 +- .../eclipse/paho.mqtt.golang}/store.go | 2 +- .../eclipse/paho.mqtt.golang}/token.go | 2 +- .../eclipse/paho.mqtt.golang}/topic.go | 0 .../eclipse/paho.mqtt.golang}/trace.go | 0 .../golang.org/x/net/websocket/websocket.go | 2 + vendor/vendor.json | 10 --- 42 files changed, 100 insertions(+), 120 deletions(-) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/CONTRIBUTING.md (67%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/DISTRIBUTION (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/LICENSE (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/README.md (70%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/about.html (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/client.go (90%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/components.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/edl-v10 (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/epl-v10 (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/filestore.go (98%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/memstore.go (97%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/message.go (96%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/messageids.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/net.go (85%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/notice.html (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/oops.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/options.go (98%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/connack.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/connect.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/disconnect.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/packets.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/pingreq.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/pingresp.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/puback.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/pubcomp.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/publish.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/pubrec.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/pubrel.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/suback.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/subscribe.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/unsuback.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/packets/unsubscribe.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/ping.go (91%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/router.go (97%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/store.go (97%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/token.go (98%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/topic.go (100%) rename vendor/{git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git => github.com/eclipse/paho.mqtt.golang}/trace.go (100%) diff --git a/backend/mqttpubsub/backend.go b/backend/mqttpubsub/backend.go index 39585deb..f3fe559d 100644 --- a/backend/mqttpubsub/backend.go +++ b/backend/mqttpubsub/backend.go @@ -5,15 +5,15 @@ import ( "encoding/gob" "fmt" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git" log "github.com/Sirupsen/logrus" "github.com/brocaar/loraserver" "github.com/brocaar/lorawan" + "github.com/eclipse/paho.mqtt.golang" ) // Backend implements a MQTT pub-sub backend. type Backend struct { - conn *mqtt.Client + conn mqtt.Client txPacketChan chan loraserver.TXPacket } @@ -97,7 +97,7 @@ func (b *Backend) publish(topic string, v interface{}) error { return nil } -func (b *Backend) txPacketHandler(c *mqtt.Client, msg mqtt.Message) { +func (b *Backend) txPacketHandler(c mqtt.Client, msg mqtt.Message) { var txPacket loraserver.TXPacket dec := gob.NewDecoder(bytes.NewReader(msg.Payload())) if err := dec.Decode(&txPacket); err != nil { diff --git a/backend/mqttpubsub/backend_test.go b/backend/mqttpubsub/backend_test.go index f77fc3ae..e00e5eb2 100644 --- a/backend/mqttpubsub/backend_test.go +++ b/backend/mqttpubsub/backend_test.go @@ -5,9 +5,8 @@ import ( "encoding/gob" "testing" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git" - "github.com/brocaar/loraserver" + "github.com/eclipse/paho.mqtt.golang" . "github.com/smartystreets/goconvey/convey" ) @@ -29,7 +28,7 @@ func TestBackend(t *testing.T) { Convey("Given the MQTT client is subscribed to RX packets", func() { rxPacketChan := make(chan loraserver.RXPacket) - token := c.Subscribe("gateway/+/rx", 0, func(c *mqtt.Client, msg mqtt.Message) { + token := c.Subscribe("gateway/+/rx", 0, func(c mqtt.Client, msg mqtt.Message) { var rxPacket loraserver.RXPacket dec := gob.NewDecoder(bytes.NewReader(msg.Payload())) if err := dec.Decode(&rxPacket); err != nil { diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/CONTRIBUTING.md b/vendor/github.com/eclipse/paho.mqtt.golang/CONTRIBUTING.md similarity index 67% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/CONTRIBUTING.md rename to vendor/github.com/eclipse/paho.mqtt.golang/CONTRIBUTING.md index ce377195..9791dc60 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/CONTRIBUTING.md +++ b/vendor/github.com/eclipse/paho.mqtt.golang/CONTRIBUTING.md @@ -28,20 +28,7 @@ Before your contribution can be accepted by the project, you need to create and Contributing Code: ------------------ -The Go client uses git with Gerrit for code review, use the following URLs for Gerrit access; - -ssh://@git.eclipse.org:29418/paho/org.eclipse.paho.mqtt.golang - -Configure a remote called review to push your changes to; - -git config remote.review.url ssh://@git.eclipse.org:29418/paho/org.eclipse.paho.mqtt.golang -git config remote.review.push HEAD:refs/for/ - -When you have made and committed a change you can push it to Gerrit for review with; - -git push review - -See https://wiki.eclipse.org/Gerrit for more details on how Gerrit is used in Eclipse, https://wiki.eclipse.org/Gerrit#Gerrit_Code_Review_Cheatsheet has some particularly useful information. +The Go client is developed in Github, see their documentation on the process of forking and pull requests; https://help.github.com/categories/collaborating-on-projects-using-pull-requests/ Git commit messages should follow the style described here; @@ -57,13 +44,13 @@ Contact the project developers via the project's "dev" list. Search for bugs: ---------------- -This project uses Bugzilla to track ongoing development and issues. +This project uses Github issues to track ongoing development and issues. -- https://bugs.eclipse.org/bugs/buglist.cgi?product=Paho&component=MQTT-Go +- https://github.com/eclipse/paho.mqtt.golang/issues Create a new bug: ----------------- Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome! -- https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Paho +- https://github.com/eclipse/paho.mqtt.golang/issues diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/DISTRIBUTION b/vendor/github.com/eclipse/paho.mqtt.golang/DISTRIBUTION similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/DISTRIBUTION rename to vendor/github.com/eclipse/paho.mqtt.golang/DISTRIBUTION diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/LICENSE b/vendor/github.com/eclipse/paho.mqtt.golang/LICENSE similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/LICENSE rename to vendor/github.com/eclipse/paho.mqtt.golang/LICENSE diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/README.md b/vendor/github.com/eclipse/paho.mqtt.golang/README.md similarity index 70% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/README.md rename to vendor/github.com/eclipse/paho.mqtt.golang/README.md index cc26f075..dc40c567 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/README.md +++ b/vendor/github.com/eclipse/paho.mqtt.golang/README.md @@ -15,14 +15,14 @@ Installation and Build This client is designed to work with the standard Go tools, so installation is as easy as: ``` -go get git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git +go get github.com/eclipse/paho.mqtt.golang ``` -The client depends on Google's [websockets](http://godoc.org/code.google.com/p/go.net/websocket) package, +The client depends on Google's [websockets](https://godoc.org/golang.org/x/net/websocket) package, also easily installed with the command: ``` -go get code.google.com/p/go.net/websocket +go get golang.org/x/net/websocket ``` @@ -30,11 +30,11 @@ Usage and API ------------- Detailed API documentation is available by using to godoc tool, or can be browsed online -using the [godoc.org](http://godoc.org/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git) service. +using the [godoc.org](http://godoc.org/github.com/eclipse/paho.mqtt.golang) service. Make use of the library by importing it in your Go client source code. For example, ``` -import MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git" +import "github.com/eclipse/paho.mqtt.golang" ``` Samples are available in the `/samples` directory for reference. @@ -49,7 +49,7 @@ Tracing is enabled by assigning logs (from the Go log package) to the logging en Reporting bugs -------------- -Please report bugs under the "MQTT-Go" Component in [Eclipse Bugzilla](http://bugs.eclipse.org/bugs/) for the Paho Technology project. This is a very new library as of Q1 2014, so there are sure to be bugs. +Please report bugs by raising issues for this project in github https://github.com/eclipse/paho.mqtt.golang/issues More information diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/about.html b/vendor/github.com/eclipse/paho.mqtt.golang/about.html similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/about.html rename to vendor/github.com/eclipse/paho.mqtt.golang/about.html diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/client.go b/vendor/github.com/eclipse/paho.mqtt.golang/client.go similarity index 90% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/client.go rename to vendor/github.com/eclipse/paho.mqtt.golang/client.go index 0aa6a55f..8b2f5e32 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/client.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/client.go @@ -22,7 +22,7 @@ import ( "sync" "time" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) type connStatus uint @@ -34,20 +34,10 @@ const ( connected ) -// ClientInt is the interface definition for a Client as used by this +// Client is the interface definition for a Client as used by this // library, the interface is primarily to allow mocking tests. -type ClientInt interface { - IsConnected() bool - Connect() Token - Disconnect(uint) - disconnect() - Publish(string, byte, bool, interface{}) Token - Subscribe(string, byte, MessageHandler) Token - SubscribeMultiple(map[string]byte, MessageHandler) Token - Unsubscribe(...string) Token -} - -// Client is an MQTT v3.1.1 client for communicating +// +// It is an MQTT v3.1.1 client for communicating // with an MQTT server using non-blocking methods that allow work // to be done in the background. // An application may connect to an MQTT server using: @@ -62,7 +52,19 @@ type ClientInt interface { // information can be found in their respective documentation. // Numerous connection options may be specified by configuring a // and then supplying a ClientOptions type. -type Client struct { + +type Client interface { + IsConnected() bool + Connect() Token + Disconnect(uint) + Publish(string, byte, bool, interface{}) Token + Subscribe(string, byte, MessageHandler) Token + SubscribeMultiple(map[string]byte, MessageHandler) Token + Unsubscribe(...string) Token +} + +// client implements the Client interface +type client struct { sync.RWMutex messageIds conn net.Conn @@ -86,8 +88,8 @@ type Client struct { // in the provided ClientOptions. The client must have the Start method called // on it before it may be used. This is to make sure resources (such as a net // connection) are created before the application is actually ready. -func NewClient(o *ClientOptions) *Client { - c := &Client{} +func NewClient(o *ClientOptions) Client { + c := &client{} c.options = *o if c.options.Store == nil { @@ -113,7 +115,7 @@ func NewClient(o *ClientOptions) *Client { // IsConnected returns a bool signifying whether // the client is connected or not. -func (c *Client) IsConnected() bool { +func (c *client) IsConnected() bool { c.RLock() defer c.RUnlock() switch { @@ -126,13 +128,13 @@ func (c *Client) IsConnected() bool { } } -func (c *Client) connectionStatus() connStatus { +func (c *client) connectionStatus() connStatus { c.RLock() defer c.RUnlock() return c.status } -func (c *Client) setConnected(status connStatus) { +func (c *client) setConnected(status connStatus) { c.Lock() defer c.Unlock() c.status = status @@ -148,7 +150,7 @@ var ErrNotConnected = errors.New("Not Connected") // that were in-flight at the last disconnect. // If clean session is true, then any existing client // state will be removed. -func (c *Client) Connect() Token { +func (c *client) Connect() Token { var err error t := newToken(packets.Connect).(*ConnectToken) DEBUG.Println(CLI, "Connect()") @@ -208,6 +210,7 @@ func (c *Client) Connect() Token { } else { t.err = fmt.Errorf("%s : %s", packets.ConnErrors[rc], err) } + c.setConnected(disconnected) t.flowComplete() return } @@ -217,7 +220,7 @@ func (c *Client) Connect() Token { c.obound = make(chan *PacketAndToken, c.options.MessageChannelDepth) c.oboundP = make(chan *PacketAndToken, c.options.MessageChannelDepth) c.ibound = make(chan packets.ControlPacket) - c.errors = make(chan error) + c.errors = make(chan error, 1) c.stop = make(chan struct{}) c.pingTimer = time.NewTimer(c.options.KeepAlive) c.pingRespTimer = time.NewTimer(time.Duration(10) * time.Second) @@ -260,7 +263,7 @@ func (c *Client) Connect() Token { } // internal function used to reconnect the client when it loses its connection -func (c *Client) reconnect() { +func (c *client) reconnect() { DEBUG.Println(CLI, "enter reconnect") c.setConnected(reconnecting) var rc byte = 1 @@ -345,7 +348,7 @@ func (c *Client) reconnect() { // when the connection is first started. // This prevents receiving incoming data while resume // is in progress if clean session is false. -func (c *Client) connect() byte { +func (c *client) connect() byte { DEBUG.Println(NET, "connect started") ca, err := packets.ReadPacket(c.conn) @@ -371,7 +374,7 @@ func (c *Client) connect() byte { // Disconnect will end the connection with the server, but not before waiting // the specified number of milliseconds to wait for existing work to be // completed. -func (c *Client) Disconnect(quiesce uint) { +func (c *client) Disconnect(quiesce uint) { if !c.IsConnected() { WARN.Println(CLI, "already disconnected") return @@ -389,7 +392,7 @@ func (c *Client) Disconnect(quiesce uint) { } // ForceDisconnect will end the connection with the mqtt broker immediately. -func (c *Client) forceDisconnect() { +func (c *client) forceDisconnect() { if !c.IsConnected() { WARN.Println(CLI, "already disconnected") return @@ -400,11 +403,14 @@ func (c *Client) forceDisconnect() { c.disconnect() } -func (c *Client) internalConnLost(err error) { - close(c.stop) - c.conn.Close() - c.workers.Wait() +func (c *client) internalConnLost(err error) { + // Only do anything if this was called and we are still "connected" + // forceDisconnect can cause incoming/outgoing/alllogic to end with + // error from closing the socket but state will be "disconnected" if c.IsConnected() { + close(c.stop) + c.conn.Close() + c.workers.Wait() if c.options.OnConnectionLost != nil { go c.options.OnConnectionLost(c, err) } @@ -416,10 +422,10 @@ func (c *Client) internalConnLost(err error) { } } -func (c *Client) disconnect() { +func (c *client) disconnect() { select { case <-c.stop: - //someone else has already closed the channel, must be error + DEBUG.Println("In disconnect and stop channel is already closed") default: close(c.stop) } @@ -433,7 +439,7 @@ func (c *Client) disconnect() { // Publish will publish a message with the specified QoS and content // to the specified topic. // Returns a token to track delivery of the message to the broker -func (c *Client) Publish(topic string, qos byte, retained bool, payload interface{}) Token { +func (c *client) Publish(topic string, qos byte, retained bool, payload interface{}) Token { token := newToken(packets.Publish).(*PublishToken) DEBUG.Println(CLI, "enter Publish") switch { @@ -461,13 +467,18 @@ func (c *Client) Publish(topic string, qos byte, retained bool, payload interfac } DEBUG.Println(CLI, "sending publish message, topic:", topic) + if pub.Qos != 0 && pub.MessageID == 0 { + pub.MessageID = c.getID(token) + token.messageID = pub.MessageID + } + persistOutbound(c.persist, pub) c.obound <- &PacketAndToken{p: pub, t: token} return token } // Subscribe starts a new subscription. Provide a MessageHandler to be executed when // a message is published on the topic provided. -func (c *Client) Subscribe(topic string, qos byte, callback MessageHandler) Token { +func (c *client) Subscribe(topic string, qos byte, callback MessageHandler) Token { token := newToken(packets.Subscribe).(*SubscribeToken) DEBUG.Println(CLI, "enter Subscribe") if !c.IsConnected() { @@ -496,7 +507,7 @@ func (c *Client) Subscribe(topic string, qos byte, callback MessageHandler) Toke // SubscribeMultiple starts a new subscription for multiple topics. Provide a MessageHandler to // be executed when a message is published on one of the topics provided. -func (c *Client) SubscribeMultiple(filters map[string]byte, callback MessageHandler) Token { +func (c *client) SubscribeMultiple(filters map[string]byte, callback MessageHandler) Token { var err error token := newToken(packets.Subscribe).(*SubscribeToken) DEBUG.Println(CLI, "enter SubscribeMultiple") @@ -526,7 +537,7 @@ func (c *Client) SubscribeMultiple(filters map[string]byte, callback MessageHand // Unsubscribe will end the subscription from each of the topics provided. // Messages published to those topics from other clients will no longer be // received. -func (c *Client) Unsubscribe(topics ...string) Token { +func (c *client) Unsubscribe(topics ...string) Token { token := newToken(packets.Unsubscribe).(*UnsubscribeToken) DEBUG.Println(CLI, "enter Unsubscribe") if !c.IsConnected() { @@ -549,6 +560,6 @@ func (c *Client) Unsubscribe(topics ...string) Token { //DefaultConnectionLostHandler is a definition of a function that simply //reports to the DEBUG log the reason for the client losing a connection. -func DefaultConnectionLostHandler(client *Client, reason error) { +func DefaultConnectionLostHandler(client Client, reason error) { DEBUG.Println("Connection lost:", reason.Error()) } diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/components.go b/vendor/github.com/eclipse/paho.mqtt.golang/components.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/components.go rename to vendor/github.com/eclipse/paho.mqtt.golang/components.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/edl-v10 b/vendor/github.com/eclipse/paho.mqtt.golang/edl-v10 similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/edl-v10 rename to vendor/github.com/eclipse/paho.mqtt.golang/edl-v10 diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/epl-v10 b/vendor/github.com/eclipse/paho.mqtt.golang/epl-v10 similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/epl-v10 rename to vendor/github.com/eclipse/paho.mqtt.golang/epl-v10 diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/filestore.go b/vendor/github.com/eclipse/paho.mqtt.golang/filestore.go similarity index 98% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/filestore.go rename to vendor/github.com/eclipse/paho.mqtt.golang/filestore.go index c43df70e..a60f9574 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/filestore.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/filestore.go @@ -21,7 +21,7 @@ import ( "path" "sync" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) const ( diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/memstore.go b/vendor/github.com/eclipse/paho.mqtt.golang/memstore.go similarity index 97% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/memstore.go rename to vendor/github.com/eclipse/paho.mqtt.golang/memstore.go index 033f25ed..580a7e02 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/memstore.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/memstore.go @@ -17,7 +17,7 @@ package mqtt import ( "sync" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) // MemoryStore implements the store interface to provide a "persistence" diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/message.go b/vendor/github.com/eclipse/paho.mqtt.golang/message.go similarity index 96% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/message.go rename to vendor/github.com/eclipse/paho.mqtt.golang/message.go index c396ec81..c8c9be23 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/message.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/message.go @@ -15,7 +15,7 @@ package mqtt import ( - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) // Message defines the externals that a message implementation must support diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/messageids.go b/vendor/github.com/eclipse/paho.mqtt.golang/messageids.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/messageids.go rename to vendor/github.com/eclipse/paho.mqtt.golang/messageids.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/net.go b/vendor/github.com/eclipse/paho.mqtt.golang/net.go similarity index 85% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/net.go rename to vendor/github.com/eclipse/paho.mqtt.golang/net.go index 8da18546..2edfe9a1 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/net.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/net.go @@ -22,10 +22,17 @@ import ( "reflect" "time" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" "golang.org/x/net/websocket" ) +func signalError(c chan<- error, err error) { + select { + case c <- err: + default: + } +} + func openConnection(uri *url.URL, tlsc *tls.Config, timeout time.Duration) (net.Conn, error) { switch uri.Scheme { case "ws": @@ -67,7 +74,7 @@ func openConnection(uri *url.URL, tlsc *tls.Config, timeout time.Duration) (net. // actually read incoming messages off the wire // send Message object into ibound channel -func incoming(c *Client) { +func incoming(c *client) { defer c.workers.Done() var err error var cp packets.ControlPacket @@ -87,17 +94,17 @@ func incoming(c *Client) { case <-c.stop: DEBUG.Println(NET, "incoming stopped") return - // Not trying to disconnect, send the error to the errors channel + // Not trying to disconnect, send the error to the errors channel default: - ERROR.Println(NET, "incoming stopped with error") - c.errors <- err + ERROR.Println(NET, "incoming stopped with error", err) + signalError(c.errors, err) return } } // receive a Message object on obound, and then // actually send outgoing message to the wire -func outgoing(c *Client) { +func outgoing(c *client) { defer c.workers.Done() DEBUG.Println(NET, "outgoing started") @@ -109,19 +116,14 @@ func outgoing(c *Client) { return case pub := <-c.obound: msg := pub.p.(*packets.PublishPacket) - if msg.Qos != 0 && msg.MessageID == 0 { - msg.MessageID = c.getID(pub.t) - pub.t.(*PublishToken).messageID = msg.MessageID - } - //persist_obound(c.persist, msg) if c.options.WriteTimeout > 0 { c.conn.SetWriteDeadline(time.Now().Add(c.options.WriteTimeout)) } if err := msg.Write(c.conn); err != nil { - ERROR.Println(NET, "outgoing stopped with error") - c.errors <- err + ERROR.Println(NET, "outgoing stopped with error", err) + signalError(c.errors, err) return } @@ -144,8 +146,8 @@ func outgoing(c *Client) { } DEBUG.Println(NET, "obound priority msg to write, type", reflect.TypeOf(msg.p)) if err := msg.p.Write(c.conn); err != nil { - ERROR.Println(NET, "outgoing stopped with error") - c.errors <- err + ERROR.Println(NET, "outgoing stopped with error", err) + signalError(c.errors, err) return } switch msg.p.(type) { @@ -164,7 +166,7 @@ func outgoing(c *Client) { // store messages if necessary // send replies on obound // delete messages from store if necessary -func alllogic(c *Client) { +func alllogic(c *client) { DEBUG.Println(NET, "logic started") @@ -174,12 +176,12 @@ func alllogic(c *Client) { select { case msg := <-c.ibound: DEBUG.Println(NET, "logic got msg on ibound") - //persist_ibound(c.persist, msg) + persistInbound(c.persist, msg) switch msg.(type) { case *packets.PingrespPacket: DEBUG.Println(NET, "received pingresp") c.pingRespTimer.Stop() - c.pingTimer.Reset(c.options.PingTimeout) + c.pingTimer.Reset(c.options.KeepAlive) case *packets.SubackPacket: sa := msg.(*packets.SubackPacket) DEBUG.Println(NET, "received suback, id:", sa.MessageID) @@ -218,19 +220,8 @@ func alllogic(c *Client) { c.oboundP <- &PacketAndToken{p: pa, t: nil} DEBUG.Println(NET, "done putting puback msg on obound") case 0: - select { - case c.incomingPubChan <- pp: - DEBUG.Println(NET, "done putting msg on incomingPubChan") - case err, ok := <-c.errors: - DEBUG.Println(NET, "error while putting msg on pubChanZero") - // We are unblocked, but need to put the error back on so the outer - // select can handle it appropriately. - if ok { - go func(errVal error, errChan chan error) { - errChan <- errVal - }(err, c.errors) - } - } + c.incomingPubChan <- pp + DEBUG.Println(NET, "done putting msg on incomingPubChan") } case *packets.PubackPacket: pa := msg.(*packets.PubackPacket) @@ -267,7 +258,7 @@ func alllogic(c *Client) { WARN.Println(NET, "logic stopped") return case err := <-c.errors: - ERROR.Println(NET, "logic got error") + ERROR.Println(NET, "logic received from error channel, other components have errored, stopping") c.internalConnLost(err) return } diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/notice.html b/vendor/github.com/eclipse/paho.mqtt.golang/notice.html similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/notice.html rename to vendor/github.com/eclipse/paho.mqtt.golang/notice.html diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/oops.go b/vendor/github.com/eclipse/paho.mqtt.golang/oops.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/oops.go rename to vendor/github.com/eclipse/paho.mqtt.golang/oops.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/options.go b/vendor/github.com/eclipse/paho.mqtt.golang/options.go similarity index 98% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/options.go rename to vendor/github.com/eclipse/paho.mqtt.golang/options.go index b66aab78..3e3f112c 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/options.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/options.go @@ -23,18 +23,18 @@ import ( // MessageHandler is a callback type which can be set to be // executed upon the arrival of messages published to topics // to which the client is subscribed. -type MessageHandler func(*Client, Message) +type MessageHandler func(Client, Message) // ConnectionLostHandler is a callback type which can be set to be // executed upon an unintended disconnection from the MQTT broker. // Disconnects caused by calling Disconnect or ForceDisconnect will // not cause an OnConnectionLost callback to execute. -type ConnectionLostHandler func(*Client, error) +type ConnectionLostHandler func(Client, error) // OnConnectHandler is a callback that is called when the client // state changes from unconnected/disconnected to connected. Both // at initial connection and on reconnection -type OnConnectHandler func(*Client) +type OnConnectHandler func(Client) // ClientOptions contains configurable options for an Client. type ClientOptions struct { diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/connack.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/connack.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/connack.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/connack.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/connect.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/connect.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/connect.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/connect.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/disconnect.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/disconnect.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/disconnect.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/disconnect.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/packets.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/packets.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/packets.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/packets.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pingreq.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingreq.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pingreq.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/pingreq.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pingresp.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pingresp.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pingresp.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/pingresp.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/puback.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/puback.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/puback.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/puback.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pubcomp.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubcomp.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pubcomp.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/pubcomp.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/publish.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/publish.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/publish.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/publish.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pubrec.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrec.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pubrec.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrec.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pubrel.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrel.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/pubrel.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/pubrel.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/suback.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/suback.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/suback.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/suback.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/subscribe.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/subscribe.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/subscribe.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/subscribe.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/unsuback.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsuback.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/unsuback.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/unsuback.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/unsubscribe.go b/vendor/github.com/eclipse/paho.mqtt.golang/packets/unsubscribe.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets/unsubscribe.go rename to vendor/github.com/eclipse/paho.mqtt.golang/packets/unsubscribe.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/ping.go b/vendor/github.com/eclipse/paho.mqtt.golang/ping.go similarity index 91% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/ping.go rename to vendor/github.com/eclipse/paho.mqtt.golang/ping.go index 62d502a5..d1e60b30 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/ping.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/ping.go @@ -17,10 +17,10 @@ package mqtt import ( "errors" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) -func keepalive(c *Client) { +func keepalive(c *client) { DEBUG.Println(PNG, "keepalive starting") for { diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/router.go b/vendor/github.com/eclipse/paho.mqtt.golang/router.go similarity index 97% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/router.go rename to vendor/github.com/eclipse/paho.mqtt.golang/router.go index 0872c7fc..842dba59 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/router.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/router.go @@ -19,7 +19,7 @@ import ( "strings" "sync" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) // route is a type which associates MQTT Topic strings with a @@ -126,7 +126,7 @@ func (r *router) setDefaultHandler(handler MessageHandler) { // takes messages off the channel, matches them against the internal route list and calls the // associated callback (or the defaultHandler, if one exists and no other route matched). If // anything is sent down the stop channel the function will end. -func (r *router) matchAndDispatch(messages <-chan *packets.PublishPacket, order bool, client *Client) { +func (r *router) matchAndDispatch(messages <-chan *packets.PublishPacket, order bool, client *client) { go func() { for { select { diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/store.go b/vendor/github.com/eclipse/paho.mqtt.golang/store.go similarity index 97% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/store.go rename to vendor/github.com/eclipse/paho.mqtt.golang/store.go index ec67d819..a705d41c 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/store.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/store.go @@ -18,7 +18,7 @@ import ( "fmt" "strconv" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) const ( diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/token.go b/vendor/github.com/eclipse/paho.mqtt.golang/token.go similarity index 98% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/token.go rename to vendor/github.com/eclipse/paho.mqtt.golang/token.go index d4dccd4f..dc54d6d6 100644 --- a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/token.go +++ b/vendor/github.com/eclipse/paho.mqtt.golang/token.go @@ -16,7 +16,7 @@ import ( "sync" "time" - "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets" + "github.com/eclipse/paho.mqtt.golang/packets" ) //PacketAndToken is a struct that contains both a ControlPacket and a diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/topic.go b/vendor/github.com/eclipse/paho.mqtt.golang/topic.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/topic.go rename to vendor/github.com/eclipse/paho.mqtt.golang/topic.go diff --git a/vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/trace.go b/vendor/github.com/eclipse/paho.mqtt.golang/trace.go similarity index 100% rename from vendor/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/trace.go rename to vendor/github.com/eclipse/paho.mqtt.golang/trace.go diff --git a/vendor/golang.org/x/net/websocket/websocket.go b/vendor/golang.org/x/net/websocket/websocket.go index 60684009..e069b330 100644 --- a/vendor/golang.org/x/net/websocket/websocket.go +++ b/vendor/golang.org/x/net/websocket/websocket.go @@ -144,6 +144,8 @@ type frameHandler interface { } // Conn represents a WebSocket connection. +// +// Multiple goroutines may invoke methods on a Conn simultaneously. type Conn struct { config *Config request *http.Request diff --git a/vendor/vendor.json b/vendor/vendor.json index dc464e3b..20052134 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -2,16 +2,6 @@ "comment": "", "ignore": "test", "package": [ - { - "path": "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git", - "revision": "617c801af238c3af2d9e72c5d4a0f02edad03ce5", - "revisionTime": "2016-02-08T11:21:59Z" - }, - { - "path": "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets", - "revision": "617c801af238c3af2d9e72c5d4a0f02edad03ce5", - "revisionTime": "2016-02-08T11:21:59Z" - }, { "path": "github.com/Sirupsen/logrus", "revision": "219c8cb75c258c552e999735be6df753ffc7afdc",