Merge branch 'restart-new' of openprivacy/libricochet-go into master
the build was successful
Details
the build was successful
Details
This commit is contained in:
commit
9ba39b93b7
|
@ -28,6 +28,9 @@ type ACN interface {
|
|||
// Sets the calback function to be called when ACN status changes
|
||||
SetStatusCallback(callback func(int, string))
|
||||
|
||||
// Restarts the underlying connection
|
||||
Restart()
|
||||
|
||||
// Open takes a hostname and returns a net.conn to the derived endpoint
|
||||
// Open allows a client to resolve various hostnames to connections
|
||||
// The supported types are onions address are:
|
||||
|
|
|
@ -63,6 +63,10 @@ func (lp *localProvider) Open(hostname string) (net.Conn, string, error) {
|
|||
|
||||
}
|
||||
|
||||
func (lp *localProvider) Restart() {
|
||||
//noop
|
||||
}
|
||||
|
||||
func (lp *localProvider) Close() {
|
||||
|
||||
}
|
||||
|
|
|
@ -155,6 +155,13 @@ func (tp *torProvider) Listen(identity PrivateKey, port int) (ListenService, err
|
|||
return ols, nil
|
||||
}
|
||||
|
||||
func (tp *torProvider) Restart() {
|
||||
if tp.statusCallback != nil {
|
||||
tp.statusCallback(0, "rebooting")
|
||||
}
|
||||
tp.restart()
|
||||
}
|
||||
|
||||
func (tp *torProvider) Open(hostname string) (net.Conn, string, error) {
|
||||
tp.lock.Lock()
|
||||
|
||||
|
|
Reference in New Issue