Skip to content

Commit eeb87a0

Browse files
authored
Merge branch 'master' into fix/update-js-samples
2 parents 072d52d + 78bb496 commit eeb87a0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ String apiSecret = "YOUR API SECRET";
6262
OpenTok opentok = new OpenTok(apiKey, apiSecret)
6363
```
6464

65+
And make sure you call `close` when you are done to prevent leaked file descriptors.
66+
67+
```java
68+
opentok.close();
69+
```
70+
6571
## Creating Sessions
6672

6773
To create an OpenTok Session, use the `OpenTok` instance's `createSession(SessionProperties properties)`

src/main/java/com/opentok/OpenTok.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,5 +451,9 @@ public OpenTok build() {
451451

452452
return new OpenTok(this.apiKey, this.apiSecret, clientBuilder.build());
453453
}
454-
}
454+
}
455+
456+
public void close() {
457+
this.client.close();
458+
}
455459
}

0 commit comments

Comments
 (0)