Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Yikes, copy this to SS. Needs refactoring later

  • Loading branch information...
commit ef9a493fb13cc8292134539a17f231a3bf9d0805 1 parent 0642ce7
@miyagawa authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/Twiggy/Server/SS.pm
View
7 lib/Twiggy/Server/SS.pm
@@ -25,6 +25,13 @@ sub register_service {
# overwrite, just in case somebody wants to refer to it afterwards
$self->{listen} = \@listen;
+
+ $self->{exit_guard} = AE::cv {
+ # Make sure that we are not listening on a socket anymore, while
+ # other events are being flushed
+ delete $self->{listen_guards};
+ };
+ $self->{exit_guard}->begin;
}
sub _create_ss_tcp_server {

4 comments on commit ef9a493

@lestrrat
Collaborator

Perhaps make register_service() call something like bind_ports/start_listen() or something? ::SS can override that method instead of the entire register_service

@miyagawa
Owner

yeah sounds like a good plan. Do you want to do that? :)

@miyagawa
Owner

merged. Thanks!

Please sign in to comment.
Something went wrong with that request. Please try again.