Skip to content

Commit

Permalink
Don't use go default http client in SoapClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Maffert committed Oct 4, 2018
1 parent 991da81 commit 64e90cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion siri/soap_client.go
Expand Up @@ -8,6 +8,7 @@ import (
"regexp"
"strconv"
"strings"
"time"

"github.com/af83/edwig/version"
"github.com/jbowtie/gokogiri/xml"
Expand Down Expand Up @@ -85,7 +86,8 @@ func (client *SOAPClient) prepareAndSendRequest(args soapClientArguments) (xml.N
httpRequest.ContentLength = soapEnvelope.Length()

// Send http request
response, err := http.DefaultClient.Do(httpRequest)
httpClient := &http.Client{Timeout: time.Second * 5}
response, err := httpClient.Do(httpRequest)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 64e90cb

Please sign in to comment.