Code keeps connection open and does not send messages.
Added a persistent notification with close button and status update.