lib/faye/websocket/api.rb in faye-websocket-0.7.4 vs lib/faye/websocket/api.rb in faye-websocket-0.7.5
- old
+ new
@@ -98,10 +98,10 @@
return false if @ready_state > OPEN
@driver.ping(message, &callback)
end
def close
- @ready_state = CLOSING if @ready_state == OPEN
+ @ready_state = CLOSING unless @ready_state == CLOSED
@driver.close
end
def protocol
@driver.protocol || ''