Skip to content

Commit 8236486

Browse files
Dev: disable EventLoopFuture promise leaking check
1 parent dd6265a commit 8236486

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Sources/NIO/EventLoopFuture.swift

+12-11
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,18 @@ public final class EventLoopFuture<T> {
384384
}
385385

386386
deinit {
387-
debugOnly {
388-
if let eventLoop = self.eventLoop as? SelectableEventLoop {
389-
let creation = eventLoop.promiseCreationStoreRemove(future: self)
390-
if !isFulfilled {
391-
fatalError("leaking promise created at \(creation)", file: creation.file, line: creation.line)
392-
}
393-
} else {
394-
precondition(isFulfilled, "leaking an unfulfilled Promise")
395-
}
396-
}
397-
387+
// https://github.com/vapor/vapor/issues/1689
388+
//
389+
// debugOnly {
390+
// if let eventLoop = self.eventLoop as? SelectableEventLoop {
391+
// let creation = eventLoop.promiseCreationStoreRemove(future: self)
392+
// if !isFulfilled {
393+
// fatalError("leaking promise created at \(creation)", file: creation.file, line: creation.line)
394+
// }
395+
// } else {
396+
// precondition(isFulfilled, "leaking an unfulfilled Promise")
397+
// }
398+
// }
398399
self._isFulfilled.destroy()
399400
}
400401
}

0 commit comments

Comments
 (0)