Skip to content

Commit 9249604

Browse files
committed
#256 fix isClosed and isConnected of NginxClojureAsynSocket
1 parent 0f8ae4d commit 9249604

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java/nginx/clojure/net/NginxClojureAsynSocket.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ public long getSoKeepAlive() {
107107
}
108108

109109
public boolean isClosed() {
110-
return s == 0;
110+
return s <= 0;
111111
}
112112

113113
public boolean isConnected() {
114-
return connected;
114+
return s > 0 && connected;
115115
}
116116

117117
public final void checkConnected() {

0 commit comments

Comments
 (0)