Skip to content
This repository was archived by the owner on Mar 21, 2019. It is now read-only.
This repository was archived by the owner on Mar 21, 2019. It is now read-only.

Graceful shutdown bug #1

@vladvelici

Description

@vladvelici

Sometines when you shutdown the server it all goes nice and smooth, but sometimes it doesn't.

There are three processes running: main stomp client, listener and parser.

The data flows like this: stomp client -> parser -> listener.

the parser has a queue from which it takes one message at a time, parses it, and puts it into the listener queue.

The queues block when they are empty to wait for a message, and that's the problem. Nothing signals the empty queue to unblock when the close signal was sent, so the clean disconnect only happens when there are unprocessed messages.

When there are unprocessed messages, the queue does not block and the quit variable gets read.

A simple solution would be a dummy/None message sent over to the queues when the processes are about to quit to avoid the deadlock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions