Plugin "Connection Lost" error in a DAW


I am trying to develop an echo effect plugin in JUCE. My plugin works fine the first time I open it in FL Studio, but when I try to close and open the plugin again, FL Studio says “Connection lost to this plugin”. Is there a particular reason why this is happening?