Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
Disable Markdown for Slack messages and increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy Griffiths committed Jul 2, 2018
1 parent d99b99f commit c237d1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mysite/code/Jobs/CheckSSLCertificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ protected function notifyNewCertificate($site, $cert)
'short' => true,
],
],
])->send('A new certificate has been detected for '.$site->Domain);
])->disableMarkdown()->send('A new certificate has been detected for '.$site->Domain);
}

/**
Expand Down Expand Up @@ -207,7 +207,7 @@ protected function notifyFailure($site, $error)
$client->attach([
'color' => 'danger',
'title' => $error,
])->send('The certificate check for '.$site->Domain.' is failing. HTTPS requests to this domain may be failing for end-users.');
])->disableMarkdown()->send('The certificate check for '.$site->Domain.' is failing. HTTPS requests to this domain may be failing for end-users.');
}

/**
Expand Down Expand Up @@ -236,7 +236,7 @@ protected function notifyCommonNameMismatch($site, $error)
$client->attach([
'color' => 'danger',
'title' => $error,
])->send('A common name mismatch has been detected for domain '.$site->Domain.'. HTTPS requests to this domain may be failing for end-users.');
])->disableMarkdown()->send('A common name mismatch has been detected for domain '.$site->Domain.'. HTTPS requests to this domain may be failing for end-users.');
}

/**
Expand Down Expand Up @@ -268,7 +268,7 @@ private function getStream($domain)
$socketErrors[] = str_replace('stream_socket_client(): ', '', $errstr);
}, E_WARNING);

$read = stream_socket_client('ssl://'.$domain.':443', $errno, $errstr, 15, STREAM_CLIENT_CONNECT, $streamOptions);
$read = stream_socket_client('ssl://'.$domain.':443', $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $streamOptions);
restore_error_handler();

if (!empty($socketErrors)) {
Expand Down

0 comments on commit c237d1d

Please sign in to comment.