Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 28ef6e6

Browse files
committed
support other servers too
write to log if unknown server
1 parent 1feb634 commit 28ef6e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/hyper-operation/transport/hyperloop.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ def self.send_data(channel, data)
122122
end
123123

124124
def self.on_server?
125-
Rails.const_defined? 'Server'
125+
if !Rails.const_defined?('Console') || Rails.const_defined?('Puma') || Rails.const_defined?('Server')
126+
true
127+
else
128+
logger.debug "Warning: You may encounter performance problems, because your server is currently not known.\n" +
129+
'Please open a server support ticket at http://github.com/ruby-hyperloop/hyper-operation.'
130+
end
126131
end
127132

128133
def self.pusher

0 commit comments

Comments
 (0)