m-barthelemy / vapor-queues-fluent-driver

A Fluent implementation for https://github.com/vapor/queues (Vapor4)
MIT License
32 stars 16 forks source link

Crash on exit #13

Closed jnordberg closed 4 years ago

jnordberg commented 4 years ago

When exiting my vapor app using this driver it crashes with:

ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. This will be upgraded to a forced crash in future SwiftNIO versions.
Fatal error: leaking promise created at (file: ".build/checkouts/swift-nio/Sources/NIO/SelectableEventLoop.swift", line: 214): file .build/checkouts/swift-nio/Sources/NIO/SelectableEventLoop.swift, line 214

This crash happens only when using vapor run, exiting when running in Xcode works normally.

Possibly related to https://github.com/m-barthelemy/vapor-queues-fluent-driver/pull/11?

Note I'm not using SQLite but the Postgres driver

m-barthelemy commented 4 years ago

Thanks for reporting your issue. I've created a no-shutdown branch with the change suggested by #11 You can try it by updating your import of this package to .package(name: "QueuesFluentDriver", url: "https://github.com/m-barthelemy/vapor-queues-fluent-driver.git", .branch("no-shutdown")),

Would you be able to test it, from Xcode and command-line? Bonus points if you are able to test it on Linux :)

m-barthelemy commented 4 years ago

Probably fixed by https://github.com/m-barthelemy/vapor-queues-fluent-driver/pull/11 You should try updating to the new release 1.0.0-rc.2 of this package. Please do reopen if you still have the issue!