You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2016/10/25 00:54:24 UTC

[1/2] qpid-proton git commit: PROTON-1332: go: electron client leaking links/sessions

Repository: qpid-proton
Updated Branches:
  refs/heads/master a1f0dd167 -> f8c4c2791


PROTON-1332: go: electron client leaking links/sessions

Was not calling proton.Link/Session.Free() so links/sessions were never freed
till the connection was closed.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f8c4c279
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f8c4c279
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f8c4c279

Branch: refs/heads/master
Commit: f8c4c279126f2143c6f9e219cd0e1b6c27b6b7f0
Parents: a17d30a
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Oct 24 20:41:59 2016 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Oct 24 20:52:30 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/go/src/qpid.apache.org/electron/handler.go | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f8c4c279/proton-c/bindings/go/src/qpid.apache.org/electron/handler.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/handler.go b/proton-c/bindings/go/src/qpid.apache.org/electron/handler.go
index 588ba79..af1efd6 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/handler.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/handler.go
@@ -159,6 +159,7 @@ func (h *handler) linkClosed(l proton.Link, err error) {
 	if link, ok := h.links[l]; ok {
 		_ = link.closed(err)
 		delete(h.links, l)
+		l.Free()
 	}
 }
 
@@ -171,6 +172,7 @@ func (h *handler) sessionClosed(ps proton.Session, err error) {
 				h.linkClosed(l, err)
 			}
 		}
+		ps.Free()
 	}
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-proton git commit: PROTON-1331: go: electron.Container.Dial returning (nil, nil)

Posted by ac...@apache.org.
PROTON-1331: go: electron.Container.Dial returning (nil, nil)

Scope error, creating new "err" variable instead of setting return variable.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a17d30a2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a17d30a2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a17d30a2

Branch: refs/heads/master
Commit: a17d30a2de5c68fd3ffa4d34da6cefa2e727bbdb
Parents: a1f0dd1
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Oct 24 20:22:25 2016 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Oct 24 20:52:30 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/go/src/qpid.apache.org/electron/container.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a17d30a2/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/container.go b/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
index 4cf5969..efb24ff 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
@@ -88,14 +88,16 @@ func (cont *container) Connection(conn net.Conn, opts ...ConnectionOption) (Conn
 }
 
 func (cont *container) Dial(network, address string, opts ...ConnectionOption) (c Connection, err error) {
-	if conn, err := net.Dial(network, address); err == nil {
+	conn, err := net.Dial(network, address)
+	if err == nil {
 		c, err = cont.Connection(conn, opts...)
 	}
 	return
 }
 
 func (cont *container) Accept(l net.Listener, opts ...ConnectionOption) (c Connection, err error) {
-	if conn, err := l.Accept(); err == nil {
+	conn, err := l.Accept()
+	if err == nil {
 		c, err = cont.Connection(conn, append(opts, Server())...)
 	}
 	return


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org