Skip to content

Commit 992ee7a

Browse files
Add isConnected() method to consumer and make getConnection() public
1 parent 59cce37 commit 992ee7a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/hosopy/actioncable/Consumer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ public void disconnect() {
105105
return connection.send(command.toJson());
106106
}
107107

108-
/*package*/ Connection getConnection() {
108+
public Connection getConnection() {
109109
return connection;
110110
}
111+
112+
public boolean isConnected() {
113+
return this.connection != null && this.connection.isOpen();
114+
}
111115
}

0 commit comments

Comments
 (0)