Move Disconnected next to Disconnect func.
This commit is contained in:
parent
1122a8a9cb
commit
7c552136bc
1 changed files with 8 additions and 8 deletions
|
@ -526,14 +526,6 @@ func (c *Client) sendPostRequest(req *http.Request, command btcjson.Cmd, respons
|
|||
}
|
||||
}
|
||||
|
||||
// Disconnected returns whether or not the server is disconnected.
|
||||
func (c *Client) Disconnected() bool {
|
||||
c.mtx.Lock()
|
||||
defer c.mtx.Unlock()
|
||||
|
||||
return c.disconnected
|
||||
}
|
||||
|
||||
// newFutureError returns a new future result channel that already has the
|
||||
// passed error waitin on the channel with the reply set to nil. This is useful
|
||||
// to easily return errors from the various Async functions.
|
||||
|
@ -649,6 +641,14 @@ func (c *Client) sendCmdAndWait(cmd btcjson.Cmd) (interface{}, error) {
|
|||
return receiveFuture(c.sendCmd(cmd))
|
||||
}
|
||||
|
||||
// Disconnected returns whether or not the server is disconnected.
|
||||
func (c *Client) Disconnected() bool {
|
||||
c.mtx.Lock()
|
||||
defer c.mtx.Unlock()
|
||||
|
||||
return c.disconnected
|
||||
}
|
||||
|
||||
// Disconnect disconnects the current websocket associated with the client. The
|
||||
// connection will automatically be re-established
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue