rclone/oauthutil/oauthutil_new.go
Oliver Heyme 73f7278497 oauthutil: Added AuthOptions and shuts down the web server properly
1. This makes AuthOptions a parameter for doConfig, Config and ConfigOffline to enable a Fs to add additional options (required for OneDrive for Business)
2. Fix to properly shutdown the webserver recieving the auth information (go1.8)
2017-08-03 19:59:42 +01:00

20 lines
290 B
Go

// oauthutil parts go1.8+
//+build go1.8
package oauthutil
import "github.com/ncw/rclone/fs"
func (s *authServer) Stop() {
fs.Debugf(nil, "Closing auth server")
if s.code != nil {
close(s.code)
s.code = nil
}
_ = s.listener.Close()
// close the server
_ = s.server.Close()
}