title: Custom SessionManager in Alamofire 4.7 cancels immediately
body: <p>Hi I'm trying to create a custom SessionManager in Alamofire in order to change the default timeoutIntervalForRequest value. I'm using the code below:</p>
  
  <pre><code>  let configuration=URLSessionConfiguration.default
    configuration.timeoutIntervalForRequest=20
    let sessionManager=Alamofire.SessionManager(configuration:configuration)
  
    sessionManager.request("my url", method: .post, parameters: params, encoding: JSONEncoding.default, headers: header)
          .responseJSON(completionHandler: { (response) in
                    if response.result.isSuccess{
                       //here goes the rest of my code
                     }
              }
                 else{
                      //here goes the connection error part
                     }
              })
  </code></pre>
  
  <p>The problem is I'm always getting the error part and when I print the response in error part, it looks like this:</p>
  
  <blockquote>
    <p>finished with error - code: -999</p>
    
    <p>FAILURE: Error Domain=NSURLErrorDomain Code=-999 "cancelled"</p>
  </blockquote>
  
  <p>as if my request immediately cancels. If I change the sessionManager to Alamofire that is the default manager, it works fine but I need to change timeoutIntervalForRequest value. I'm using Xcode 9.3 and swift 4 and Alamofire 4.7.2 . Any Suggestions?</p>