Skip to content

Commit

Permalink
Fix #3577 (#3579)
Browse files Browse the repository at this point in the history
  • Loading branch information
twose authored Aug 17, 2020
1 parent c997961 commit ac74094
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions swoole_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,17 +906,6 @@ static php_stream *socket_create(const char *proto,
abstract->socket = sock;
abstract->stream.socket = sock->get_fd();

if (timeout) {
sock->set_timeout(timeout);
abstract->stream.timeout = *timeout;
} else if (FG(default_socket_timeout) > 0) {
sock->set_timeout((double) FG(default_socket_timeout));
abstract->stream.timeout.tv_sec = FG(default_socket_timeout);
} else {
sock->set_timeout(-1);
abstract->stream.timeout.tv_sec = -1;
}

persistent_id = nullptr; // prevent stream api in user level using pconnect to persist the socket
stream = php_stream_alloc_rel(&socket_ops, abstract, persistent_id, "r+");

Expand Down

0 comments on commit ac74094

Please sign in to comment.