Skip to content

Commit

Permalink
Clarify publish behavior. Resolves #125.
Browse files Browse the repository at this point in the history
  • Loading branch information
sclausen committed Jan 3, 2019
1 parent 9c9d348 commit 1d8ffb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mqtt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ export class MqttService {
}

/**
* This method publishes a message for a topic with optional options.
* The returned observable will emit empty value and complete, if publishing was successful
* and will throw an error, if the publication fails.
* This method returns an observable for a topic with optional options.
* After subscribing, the actual mqtt publication will be executed and
* the observable will emit an empty value and completes, if publishing was successful
* or throws an error, if the publication fails.
*/
public publish(topic: string, message: any, options?: IPublishOptions): Observable<void> {
if (!this.client) {
Expand Down

0 comments on commit 1d8ffb9

Please sign in to comment.