Skip to content

Commit

Permalink
fix: fixed a bug with outgoing messages (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: alexandertsoy <atsoy@b2broker.com>
  • Loading branch information
Lils2013 and alexandertsoy committed Oct 12, 2023
1 parent 4e86aae commit c7276d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions initiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type InitiatorHandler interface {
StopWithError(err error)
Send(message SendingMessage) error
Context() context.Context
Stop()
}

// Initiator provides the client-side service functionality.
Expand Down Expand Up @@ -92,6 +93,8 @@ func (c *Initiator) Serve() error {

err := c.conn.Write(msg)
if err != nil {
c.handler.Stop()

return ErrConnClosed
}
}
Expand Down

0 comments on commit c7276d4

Please sign in to comment.