swimos / swim

Full stack application platform for building stateful microservices, streaming APIs, and real-time UIs
https://www.swimos.org
Apache License 2.0
489 stars 39 forks source link

NullPointerException when closing an Agent which has an HttpLane #161

Open ajay-gov opened 3 months ago

ajay-gov commented 3 months ago

Describe the bug NullPointerException when closing an Agent which has an HttpLane

To Reproduce Steps to reproduce the behavior:

  1. Create an Agent with an HttpLane
  2. Call close() on the Agent to see the stacktrace

Additional context The agent does not recover after this error, i.e commands send to this agent's uri are never received

Log output

java.lang.NullPointerException: Cannot invoke "swim.system.http.RestLaneModel.closeLaneView(swim.api.Lane)" because "this.laneBinding" is null
    at swim.system.http.RestLaneView.close(RestLaneView.java:52)
    at swim.system.LaneModel.willClose(LaneModel.java:532)
    at swim.system.AbstractTierBinding.close(AbstractTierBinding.java:281)
    at swim.system.agent.AgentNode.willClose(AgentNode.java:595)
    at swim.system.agent.AgentModel.willClose(AgentModel.java:582)