Skip to content

Commit

Permalink
Moved SessionDelegate Properties to top as @unusuallyreticent suggested
Browse files Browse the repository at this point in the history
The issue is here
Alamofire#1938
  • Loading branch information
chamira committed Feb 1, 2017
1 parent fa3c6d0 commit 9a0f72e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Source/SessionDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ import Foundation
/// Responsible for handling all delegate callbacks for the underlying session.
open class SessionDelegate: NSObject {

// MARK: Properties

var retrier: RequestRetrier?
weak var sessionManager: SessionManager?

private var requests: [Int: Request] = [:]
private let lock = NSLock()


// MARK: URLSessionDelegate Overrides

/// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`.
Expand Down Expand Up @@ -157,15 +166,6 @@ open class SessionDelegate: NSObject {
var _streamTaskDidBecomeInputStream: Any?

#endif

// MARK: Properties

var retrier: RequestRetrier?
weak var sessionManager: SessionManager?

private var requests: [Int: Request] = [:]
private let lock = NSLock()

/// Access the task delegate for the specified task in a thread-safe manner.
open subscript(task: URLSessionTask) -> Request? {
get {
Expand Down

0 comments on commit 9a0f72e

Please sign in to comment.