lib/celluloid/io/unix_server.rb in celluloid-io-0.13.0 vs lib/celluloid/io/unix_server.rb in celluloid-io-0.13.1
- old
+ new
@@ -14,21 +14,15 @@
def initialize(socket_path)
@server = ::UNIXServer.new(socket_path)
end
def accept
- actor = Thread.current[:celluloid_actor]
-
- if evented?
- Celluloid.current_actor.wait_readable @server
- accept_nonblock
- else
- Celluloid::IO::UNIXSocket.from_ruby_socket @server.accept
- end
+ Celluloid::IO.wait_readable(@server)
+ accept_nonblock
end
def accept_nonblock
- Celluloid::IO::UNIXSocket.from_ruby_socket @server.accept_nonblock
+ Celluloid::IO::UNIXSocket.new(@server.accept_nonblock)
end
def to_io
@server
end