Skip to content

Assertion failure after restarting database. #107

@ileitch

Description

@ileitch

Reproduction:

  1. Start postgres (I'm using docker for this)
  2. Run serve and make a request to an endpoint that performs a query
  3. Stop postgres
  4. Perform the request again, and observe the logged error:
    [ ERROR ] connection reset (error set): Connection refused (errno: 61)
  5. Start postgres again
  6. Perform the request again, this time the process exists with: Assertion failed: PostgresConnection deinitialized before being closed.: file /Users/ian/code/streambuddy/.build/checkouts/postgres-nio/Sources/PostgresNIO/Connection/PostgresConnection.swift, line 42

Expected outcome:
serve gracefully handles the restart and makes a new connection to postgres.

Actual outcome:
serve exits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions