Skip to content

Commit

Permalink
Merge pull request #56 from go-stomp/issue-48
Browse files Browse the repository at this point in the history
Avoid early return when no options are specified
  • Loading branch information
worg authored Jan 2, 2019
2 parents 45514f7 + 684aa68 commit 8f2263b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func createSendFrame(destination, contentType string, body []byte, opts []func(*

for _, opt := range opts {
if opt == nil {
return nil, ErrNilOption
continue
}
if err := opt(f); err != nil {
return nil, err
Expand Down Expand Up @@ -537,7 +537,7 @@ func (c *Conn) Subscribe(destination string, ack AckMode, opts ...func(*frame.Fr

for _, opt := range opts {
if opt == nil {
return nil, ErrNilOption
continue
}
err := opt(subscribeFrame)
if err != nil {
Expand Down

0 comments on commit 8f2263b

Please sign in to comment.