Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(646)

Issue 6250083: add juju.Conn.Close

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by fwereade
Modified:
11 years, 10 months ago
Reviewers:
mp+108309
Visibility:
Public.

Description

add juju.Conn.Close I'm not sure that there's an especially clean way to enforce the "don't close conn state directly" advice. If someone can think of one, please let me know, so I can fix that now :). https://code.launchpad.net/~fwereade/juju/go-close-conn/+merge/108309 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 4

Patch Set 2 : add juju.Conn.Close #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -2 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M juju/conn.go View 1 2 chunks +15 lines, -1 line 0 comments Download
M juju/conn_test.go View 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 3
fwereade
Please take a look.
11 years, 10 months ago (2012-06-01 09:17:52 UTC) #1
niemeyer
LGTM https://codereview.appspot.com/6250083/diff/1/juju/conn.go File juju/conn.go (right): https://codereview.appspot.com/6250083/diff/1/juju/conn.go#newcode49 juju/conn.go:49: // Conn itself is no longer required, the ...
11 years, 10 months ago (2012-06-01 12:33:02 UTC) #2
fwereade
11 years, 10 months ago (2012-06-01 12:50:01 UTC) #3
*** Submitted:

add juju.Conn.Close

I'm not sure that there's an especially clean way to enforce the "don't close
conn state directly" advice. If someone can think of one, please let me know,
so I can fix that now :).

R=
CC=
https://codereview.appspot.com/6250083

https://codereview.appspot.com/6250083/diff/1/juju/conn.go
File juju/conn.go (right):

https://codereview.appspot.com/6250083/diff/1/juju/conn.go#newcode49
juju/conn.go:49: // Conn itself is no longer required, the Conn itself should be
closed.
On 2012/06/01 12:33:02, niemeyer wrote:
> I think we can be more terse:
> 
> // State returns the environment State associated with c.
> // Closing the obtained state will have undefined
> // consequences. Close c itself instead.

Done.

https://codereview.appspot.com/6250083/diff/1/juju/conn.go#newcode67
juju/conn.go:67: // Close closes the conn's shared State.
On 2012/06/01 12:33:02, niemeyer wrote:
> // Close terminates the communication with the environment
> // and releases any associated resources.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b