Demo Plugin: Enabling and disabling demo plugin generates "connection is shutdown" error

Description

A separate ticket has been filed for error message getting generated while disabling all plugins. This seems to be an isolated case pertinent to demo plugin only. Please see QA test steps for more detail.

QA Test Steps

1. Build demo plugin from master.
2. Install it in a MM instance.
3. Enable it, then disable.
4. Enable it again.

Expected: Enabling and disabling happens smoothly without error every time.

Observed: Plugin is enabled smoothly in step 3. In step 4, enabling generates > 50 lines of the following error:
`RPC call MessageHasBeenPosted to plugin failed. caller="mlog/log.go:174" error="connection is shut down" plugin_id=com.mattermost.demo-plugin`

Status

Mana

None

Assignee

Ali Farooq

QA Assignee

None

Reporter

Prapti Shrestha

Epic Link

None

Fix versions

Mattermost Team

Sustained Engineering

Labels

None

QA Testing Areas

Plugins

GitHub Issue

None

Components

None
Configure