Skip to content

Stopping server instance produces "unclosed file" warning #264

@everdimension

Description

@everdimension

Hi! Thanks you for making this library.

I have code like this in my main.py file:

from waitress import serve

# ...

serve(app, host='0.0.0.0', port=8080)

I run file from the terminal like this:

> python main.py
Serving on http://0.0.0.0:8080

Everything works fine. Then I want to shutdown the server. I press command + c

I see this warning:

^C/usr/local/lib/python2.7/site-packages/waitress/wasyncore.py:617: UserWarning: unclosed file <waitress.wasyncore.file_wrapper instance at 0x1054ab950>
  warnings.warn("unclosed file %r" % self, compat.ResourceWarning)

I'm not sure if this is intended. "Unclosed file" doesn't sound that good. Am I doing something wrong when I stop the server or is this intended behavior?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions