Skip to content

Replace listen() call with URIs passed to constructor #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 27, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consistent CS to return early
  • Loading branch information
clue committed Jan 23, 2017
commit 99bbf2e8e356c6f433eaca14b768323834cb5f51
12 changes: 7 additions & 5 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ class Connection extends Stream implements ConnectionInterface
{
public function handleClose()
{
if (is_resource($this->stream)) {
// http://chat.stackoverflow.com/transcript/message/7727858#7727858
stream_socket_shutdown($this->stream, STREAM_SHUT_RDWR);
stream_set_blocking($this->stream, false);
fclose($this->stream);
if (!is_resource($this->stream)) {
return;
}

// http://chat.stackoverflow.com/transcript/message/7727858#7727858
stream_socket_shutdown($this->stream, STREAM_SHUT_RDWR);
stream_set_blocking($this->stream, false);
fclose($this->stream);
}

public function getRemoteAddress()
Expand Down
10 changes: 6 additions & 4 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,13 @@ public function getPort()

public function shutdown()
{
if (is_resource($this->master)) {
$this->loop->removeStream($this->master);
fclose($this->master);
$this->removeAllListeners();
if (!is_resource($this->master)) {
return;
}

$this->loop->removeStream($this->master);
fclose($this->master);
$this->removeAllListeners();
}

public function createConnection($socket)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy