Skip to content

Commit 2fb5ee6

Browse files
committed
Fix crash and add debug log
1 parent add98b0 commit 2fb5ee6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/owa/utils.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (options *Options) getURIToAuthenticate(host string) string {
8989

9090
// webRequestCodeResponse request an URI and return the status code
9191
func (options *Options) webRequestCodeResponse(URI string) int {
92-
92+
options.Log.Debug("Checking " + URI)
9393
timeout := time.Duration(3 * time.Second)
9494
client := &http.Client{
9595
Timeout: timeout,
@@ -100,6 +100,7 @@ func (options *Options) webRequestCodeResponse(URI string) int {
100100
resp, err := client.Do(req)
101101
if err != nil {
102102
options.Log.Error(err.Error())
103+
return 0
103104
}
104105
return resp.StatusCode
105106
}

0 commit comments

Comments
 (0)